PHP Class Silber\Bouncer\Database\Queries\Roles

Show file Open project: JosephSilber/bouncer

Public Methods

Method Description
constrainWhereAssignedTo ( Builder $query, string | Model | Illuminate\Database\Eloquent\Collection $model, array $keys = null ) : void Constrain the given roles query to those that were assigned to the given authorities.
constrainWhereIs ( Builder $query, string $role ) : Builder Constrain the given query by the provided role.
constrainWhereIsAll ( Builder $query, string $role ) : Builder Constrain the given query by all provided roles.

Method Details

constrainWhereAssignedTo() public method

Constrain the given roles query to those that were assigned to the given authorities.
public constrainWhereAssignedTo ( 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
return void

constrainWhereIs() public method

Constrain the given query by the provided role.
public constrainWhereIs ( Builder $query, string $role ) : Builder
$query Illuminate\Database\Eloquent\Builder
$role string
return Illuminate\Database\Eloquent\Builder

constrainWhereIsAll() public method

Constrain the given query by all provided roles.
public constrainWhereIsAll ( Builder $query, string $role ) : Builder
$query Illuminate\Database\Eloquent\Builder
$role string
return Illuminate\Database\Eloquent\Builder