PHP Трейт Silber\Bouncer\Database\IsRole

Наследование: use trait HasAbilities, use trait Authorizable
Показать файл Открыть проект

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

Метод Описание
assignTo ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) Assign the role to the given model(s).
getClipboardInstance ( )
retractFrom ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) Retract the role from the given model(s).
scopeWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void Constrain the given query to roles that were assigned to the given authorities.
users ( ) : Illuminate\Database\Eloquent\Relations\MorphedByMany The users relationship.

Защищенные методы

Метод Описание
createAssignRecords ( Model $model, array $keys ) : array Create the pivot table records for assigning the role to given models.

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

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

Assign the role to the given model(s).
public assignTo ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null )
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array

createAssignRecords() защищенный Метод

Create the pivot table records for assigning the role to given models.
protected createAssignRecords ( Model $model, array $keys ) : array
$model Illuminate\Database\Eloquent\Model
$keys array
Результат array

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

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

Retract the role from the given model(s).
public retractFrom ( string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null )
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array

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

Constrain the given query to roles that were assigned to the given authorities.
public scopeWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void
$query Illuminate\Database\Eloquent\Builder
$model string | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Collection
$keys array
Результат void

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

The users relationship.
public users ( ) : Illuminate\Database\Eloquent\Relations\MorphedByMany
Результат Illuminate\Database\Eloquent\Relations\MorphedByMany