HasRole
trait HasRole
Traits
Methods
mixed
assignRole($role)
Assign the given role to the user
bool
hasRole($role)
Determine if the user has the given role
bool
hasPermission($permission)
Determine if the user can perform a given action
Collection
roles()
Get roles for current user
Details
in MakeRoleModel at line 14
roleModel()
Make a role model
in MakePermissionModel at line 15
Model
permissionModel()
Make permission model
at line 26
mixed
assignRole($role)
Assign the given role to the user
at line 49
bool
hasRole($role)
Determine if the user has the given role
at line 64
bool
hasPermission($permission)
Determine if the user can perform a given action
at line 87
Collection
roles()
Get roles for current user