PHP Класс Caffeinated\Shinobi\Models\Permission

Наследование: extends Illuminate\Database\Eloquent\Model
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$fillable array The attributes that are fillable via mass assignment.
$table string The database table used by the model.

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

Метод Описание
assignRole ( integer $roleId = null ) : boolean Assigns the given role to the permission.
revokeAllRoles ( ) : boolean Revokes all roles from the permission.
revokeRole ( integer $roleId = '' ) : boolean Revokes the given role from the permission.
roles ( ) : Model Permissions can belong to many roles.
syncRoles ( array $roleIds = [] ) : boolean Syncs the given role(s) with the permission.

Описание методов

assignRole() публичный Метод

Assigns the given role to the permission.
public assignRole ( integer $roleId = null ) : boolean
$roleId integer
Результат boolean

revokeAllRoles() публичный Метод

Revokes all roles from the permission.
public revokeAllRoles ( ) : boolean
Результат boolean

revokeRole() публичный Метод

Revokes the given role from the permission.
public revokeRole ( integer $roleId = '' ) : boolean
$roleId integer
Результат boolean

roles() публичный Метод

Permissions can belong to many roles.
public roles ( ) : Model
Результат Illuminate\Database\Eloquent\Model

syncRoles() публичный Метод

Syncs the given role(s) with the permission.
public syncRoles ( array $roleIds = [] ) : boolean
$roleIds array
Результат boolean

Описание свойств

$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