PHP Class Caffeinated\Shinobi\Models\Permission

Inheritance: extends Illuminate\Database\Eloquent\Model
Datei anzeigen Open project: caffeinated/shinobi Class Usage Examples

Protected Properties

Property Type Description
$fillable array The attributes that are fillable via mass assignment.
$table string The database table used by the model.

Public Methods

Method Description
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.

Method Details

assignRole() public method

Assigns the given role to the permission.
public assignRole ( integer $roleId = null ) : boolean
$roleId integer
return boolean

revokeAllRoles() public method

Revokes all roles from the permission.
public revokeAllRoles ( ) : boolean
return boolean

revokeRole() public method

Revokes the given role from the permission.
public revokeRole ( integer $roleId = '' ) : boolean
$roleId integer
return boolean

roles() public method

Permissions can belong to many roles.
public roles ( ) : Model
return Illuminate\Database\Eloquent\Model

syncRoles() public method

Syncs the given role(s) with the permission.
public syncRoles ( array $roleIds = [] ) : boolean
$roleIds array
return boolean

Property Details

$fillable protected_oe property

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

$table protected_oe property

The database table used by the model.
protected string $table
return string