PHP Interface Laratrust\Contracts\LaratrustRoleInterface

Mostra file Open project: santigarcor/laratrust

Public Methods

Method Description
attachPermission ( object | array $permission ) : void Attach permission to current role.
attachPermissions ( mixed $permissions ) : void Attach multiple permissions to current role.
detachPermission ( object | array $permission ) : void Detach permission form current role.
detachPermissions ( mixed $permissions ) : void Detach multiple permissions from current role
permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with the permission model.
savePermissions ( mixed $inputPermissions ) : void Save the inputted permissions.
users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Many-to-Many relations with the user model.

Method Details

attachPermission() public method

Attach permission to current role.
public attachPermission ( object | array $permission ) : void
$permission object | array
return void

attachPermissions() public method

Attach multiple permissions to current role.
public attachPermissions ( mixed $permissions ) : void
$permissions mixed
return void

detachPermission() public method

Detach permission form current role.
public detachPermission ( object | array $permission ) : void
$permission object | array
return void

detachPermissions() public method

Detach multiple permissions from current role
public detachPermissions ( mixed $permissions ) : void
$permissions mixed
return void

permissions() public method

Many-to-Many relations with the permission model.
public permissions ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany

savePermissions() public method

Save the inputted permissions.
public savePermissions ( mixed $inputPermissions ) : void
$inputPermissions mixed
return void

users() public method

Many-to-Many relations with the user model.
public users ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
return Illuminate\Database\Eloquent\Relations\BelongsToMany