메소드 |
설명 |
|
__construct ( Silber\Bouncer\Contracts\Clipboard $clipboard ) |
Constructor. |
|
ability ( array $attributes = [] ) : Ability |
Get an instance of the ability model. |
|
allow ( Model | string $authority ) : GivesAbility |
Start a chain, to allow the given authority an ability. |
|
allows ( string $ability, array | mixed $arguments = [] ) : boolean |
Determine if the given ability should be granted for the current authority. |
|
assign ( Role | string $role ) : AssignsRole |
Start a chain, to assign the given role to a model. |
|
cache ( Illuminate\Contracts\Cache\Store $cache = null ) |
Use the given cache instance. |
|
create ( Model $user = null ) : static |
Create a new Bouncer instance. |
|
define ( string $ability, callable | string $callback ) |
Define a new ability using a callback. |
|
denies ( string $ability, array | mixed $arguments = [] ) : boolean |
Determine if the given ability should be denied for the current authority. |
|
disallow ( Model | string $authority ) : RemovesAbility |
Start a chain, to disallow the given authority an ability. |
|
dontCache ( ) |
Fully disable all query caching. |
|
forbid ( Model | string $authority ) : GivesAbility |
Start a chain, to forbid the given authority an ability. |
|
getGate ( $throw = false ) : Illuminate\Contracts\Auth\Access\Gate | null |
Get the gate instance. |
|
is ( Model $authority ) : ChecksRole |
Start a chain, to check if the given authority has a certain role. |
|
make ( Model $user = null ) : Silber\Bouncer\Factory. |
Create a bouncer factory instance. |
|
ownedVia ( string | Closure $model, string | Closure | null $attribute = null ) : void |
Register an attribute/callback to determine if a model is owned by a given authority. |
|
refresh ( Model $authority = null ) |
Clear the cache. |
|
refreshFor ( Model $authority ) |
Clear the cache for the given authority. |
|
retract ( Role | string $role ) : RemovesRole |
Start a chain, to retract the given role from a model. |
|
role ( array $attributes = [] ) : Role |
Get an instance of the role model. |
|
seed ( ) |
Run the registered seeders. |
|
seeder ( Closure | string $seeder ) |
Register a seeder callback. |
|
setGate ( Illuminate\Contracts\Auth\Access\Gate $gate ) |
Set the access gate instance. |
|
tables ( array $map ) : void |
Set custom table names. |
|
unforbid ( Model | string $authority ) : RemovesAbility |
Start a chain, to unforbid the given authority an ability. |
|
useAbilityModel ( string $model ) |
Set the model to be used for abilities. |
|
useRoleModel ( string $model ) |
Set the model to be used for roles. |
|
useUserModel ( string $model ) |
Set the model to be used for users. |
|
usesCachedClipboard ( ) : boolean |
Determine whether the clipboard used is a cached clipboard. |
|