PHP 인터페이스 Spatie\Permission\Contracts\Role

파일 보기 프로젝트 열기: spatie/laravel-permission

공개 메소드들

메소드 설명
findByName ( string $name ) Find a role by its name.
hasPermissionTo ( string | Spatie\Permission\Contracts\Permission $permission ) : boolean Determine if the user may perform the given permission.
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A role may be given various permissions.
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany A role may be assigned to various users.

메소드 상세

findByName() 공개 정적인 메소드

Find a role by its name.
public static findByName ( string $name )
$name string

hasPermissionTo() 공개 메소드

Determine if the user may perform the given permission.
public hasPermissionTo ( string | Spatie\Permission\Contracts\Permission $permission ) : boolean
$permission string | Spatie\Permission\Contracts\Permission
리턴 boolean

permissions() 공개 메소드

A role may be given various permissions.
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany

users() 공개 메소드

A role may be assigned to various users.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany