PHP 트레잇 app\HasRoles

파일 보기 프로젝트 열기: appzcoder/laravel-admin

공개 메소드들

메소드 설명
assignRole ( string $role ) : mixed Assign the given role to the user.
hasPermission ( Permission $permission ) : boolean Determine if the user may perform the given permission.
hasRole ( mixed $role ) : boolean Determine if the user has the given role.
roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A user may have multiple roles.

메소드 상세

assignRole() 공개 메소드

Assign the given role to the user.
public assignRole ( string $role ) : mixed
$role string
리턴 mixed

hasPermission() 공개 메소드

Determine if the user may perform the given permission.
public hasPermission ( Permission $permission ) : boolean
$permission Permission
리턴 boolean

hasRole() 공개 메소드

Determine if the user has the given role.
public hasRole ( mixed $role ) : boolean
$role mixed
리턴 boolean

roles() 공개 메소드

A user may have multiple roles.
public roles ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany