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

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

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

Метод Описание
createForModel ( Model | string $model, string | array $attributes ) : static Create a new ability for a specific model.
getIdentifierAttribute ( ) : string Get the identifier for this ability.
getSlugAttribute ( ) : string Get the ability's "slug" attribute.
makeForModel ( Model | string $model, string | array $attributes ) : static Make a new ability for a specific model.
roles ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany The roles relationship.
scopeByName ( Builder | Builder $query, $name, $strict = false ) : void Constrain a query to having the given name.
scopeForModel ( Builder | Builder $query, Model | string $model, boolean $strict = false ) : void Constrain a query to an ability for a specific model.
scopeSimpleAbility ( Builder | Builder $query ) : void Constrain a query to simple abilities.
users ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany The users relationship.

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

createForModel() публичный статический Метод

Create a new ability for a specific model.
public static createForModel ( Model | string $model, string | array $attributes ) : static
$model Illuminate\Database\Eloquent\Model | string
$attributes string | array
Результат static

getIdentifierAttribute() закрытый публичный Метод

Get the identifier for this ability.
final public getIdentifierAttribute ( ) : string
Результат string

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

Get the ability's "slug" attribute.
public getSlugAttribute ( ) : string
Результат string

makeForModel() публичный статический Метод

Make a new ability for a specific model.
public static makeForModel ( Model | string $model, string | array $attributes ) : static
$model Illuminate\Database\Eloquent\Model | string
$attributes string | array
Результат static

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

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

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

Constrain a query to having the given name.
public scopeByName ( Builder | Builder $query, $name, $strict = false ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
Результат void $name

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

Constrain a query to an ability for a specific model.
public scopeForModel ( Builder | Builder $query, Model | string $model, boolean $strict = false ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
$model Illuminate\Database\Eloquent\Model | string
$strict boolean
Результат void

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

Constrain a query to simple abilities.
public scopeSimpleAbility ( Builder | Builder $query ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
Результат void

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

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