PHP Trait Silber\Bouncer\Conductors\Traits\ConductsAbilities

Show file Open project: JosephSilber/bouncer

Public Methods

Method Description
everything ( array $attributes = [] ) : mixed Allow/disallow all abilities on everything.
toAlways ( array | string $abilities, array $attributes = [] ) : mixed Allow/disallow the given ability on all models.
toManage ( string | array | Model $models, array $attributes = [] ) : void Allow/disallow all abilities on the given model.
toOwn ( string $model, array $attributes = [] ) : void Allow/disallow owning the given model.
toOwnEverything ( array $attributes = [] ) : mixed Allow/disallow owning all models.

Method Details

everything() public method

Allow/disallow all abilities on everything.
public everything ( array $attributes = [] ) : mixed
$attributes array
return mixed

toAlways() public method

Allow/disallow the given ability on all models.
public toAlways ( array | string $abilities, array $attributes = [] ) : mixed
$abilities array | string
$attributes array
return mixed

toManage() public method

Allow/disallow all abilities on the given model.
public toManage ( string | array | Model $models, array $attributes = [] ) : void
$models string | array | Illuminate\Database\Eloquent\Model
$attributes array
return void

toOwn() public method

Allow/disallow owning the given model.
public toOwn ( string $model, array $attributes = [] ) : void
$model string
$attributes array
return void

toOwnEverything() public method

Allow/disallow owning all models.
public toOwnEverything ( array $attributes = [] ) : mixed
$attributes array
return mixed