PHP 클래스 Caffeinated\Shinobi\Models\Role

상속: extends Illuminate\Database\Eloquent\Model
파일 보기 프로젝트 열기: caffeinated/shinobi 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$fillable array The attributes that are fillable via mass assignment.
$table string The database table used by the model.
$tag string The cache tag used by the model.

공개 메소드들

메소드 설명
assignPermission ( integer $permissionId = null ) : boolean Assigns the given permission to the role.
can ( string $permission ) : boolean Checks if the role has the given permission.
canAtLeast ( array $permission = [] ) : boolean Check if the role has at least one of the given permissions.
flushPermissionCache ( ) : void Flush the permission cache repository.
getPermissions ( ) : array Get permission slugs assigned to role.
permissions ( ) : Model Roles can have many permissions.
revokeAllPermissions ( ) : boolean Revokes all permissions from the role.
revokePermission ( integer $permissionId = '' ) : boolean Revokes the given permission from the role.
syncPermissions ( array $permissionIds = [] ) : boolean Syncs the given permission(s) with the role.
users ( ) : Model Roles can belong to many users.

메소드 상세

assignPermission() 공개 메소드

Assigns the given permission to the role.
public assignPermission ( integer $permissionId = null ) : boolean
$permissionId integer
리턴 boolean

can() 공개 메소드

Checks if the role has the given permission.
public can ( string $permission ) : boolean
$permission string
리턴 boolean

canAtLeast() 공개 메소드

Check if the role has at least one of the given permissions.
public canAtLeast ( array $permission = [] ) : boolean
$permission array
리턴 boolean

flushPermissionCache() 공개 메소드

Flush the permission cache repository.
public flushPermissionCache ( ) : void
리턴 void

getPermissions() 공개 메소드

Get permission slugs assigned to role.
public getPermissions ( ) : array
리턴 array

permissions() 공개 메소드

Roles can have many permissions.
public permissions ( ) : Model
리턴 Illuminate\Database\Eloquent\Model

revokeAllPermissions() 공개 메소드

Revokes all permissions from the role.
public revokeAllPermissions ( ) : boolean
리턴 boolean

revokePermission() 공개 메소드

Revokes the given permission from the role.
public revokePermission ( integer $permissionId = '' ) : boolean
$permissionId integer
리턴 boolean

syncPermissions() 공개 메소드

Syncs the given permission(s) with the role.
public syncPermissions ( array $permissionIds = [] ) : boolean
$permissionIds array
리턴 boolean

users() 공개 메소드

Roles can belong to many users.
public users ( ) : Model
리턴 Illuminate\Database\Eloquent\Model

프로퍼티 상세

$fillable 보호되어 있는 프로퍼티

The attributes that are fillable via mass assignment.
protected array $fillable
리턴 array

$table 보호되어 있는 프로퍼티

The database table used by the model.
protected string $table
리턴 string

$tag 보호되어 있는 프로퍼티

The cache tag used by the model.
protected string $tag
리턴 string