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

Показать файл Открыть проект

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

Метод Описание
abilities ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany The abilities relationship.
allow ( mixed $ability, mixed | null $model = null ) Give an ability to the model.
disallow ( mixed $ability, mixed | null $model = null ) Remove an ability from the model.
forbid ( mixed $ability, mixed | null $model = null ) Forbid an ability to the model.
getAbilities ( ) : Illuminate\Database\Eloquent\Collection Get all of the model's allowed abilities.
getForbiddenAbilities ( ) : Illuminate\Database\Eloquent\Collection Get all of the model's allowed abilities.
unforbid ( mixed $ability, mixed | null $model = null ) Remove ability forbiddal from the model.

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

Метод Описание
getClipboardInstance ( ) : Clipboard Get an instance of the bouncer's clipboard.

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

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

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

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

Give an ability to the model.
public allow ( mixed $ability, mixed | null $model = null )
$ability mixed
$model mixed | null

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

Remove an ability from the model.
public disallow ( mixed $ability, mixed | null $model = null )
$ability mixed
$model mixed | null

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

Forbid an ability to the model.
public forbid ( mixed $ability, mixed | null $model = null )
$ability mixed
$model mixed | null

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

Get all of the model's allowed abilities.
public getAbilities ( ) : Illuminate\Database\Eloquent\Collection
Результат Illuminate\Database\Eloquent\Collection

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

Get an instance of the bouncer's clipboard.
protected getClipboardInstance ( ) : Clipboard
Результат Silber\Bouncer\Clipboard

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

Get all of the model's allowed abilities.
public getForbiddenAbilities ( ) : Illuminate\Database\Eloquent\Collection
Результат Illuminate\Database\Eloquent\Collection

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

Remove ability forbiddal from the model.
public unforbid ( mixed $ability, mixed | null $model = null )
$ability mixed
$model mixed | null