PHP Трейт app\HasRoles

Показать файл Открыть проект

Открытые методы

Метод Описание
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