Property | Type | Description | |
---|---|---|---|
$cache | Illuminate\Contracts\Cache\Store | The cache store. | |
$tag | string | The tag used for caching. |
Method | Description | |
---|---|---|
__construct ( Illuminate\Contracts\Cache\Store $cache ) | Constructor. | |
getAbilities ( |
Get the given authority's abilities. | |
getCache ( ) : Illuminate\Contracts\Cache\Store | Get the cache instance. | |
getFreshAbilities ( |
Get a fresh copy of the given authority's abilities. | |
getRoles ( |
Get the given authority's roles. | |
refresh ( null | |
Clear the cache. | |
refreshFor ( |
Clear the cache for the given authority. | |
setCache ( Illuminate\Contracts\Cache\Store $cache ) | Set the cache instance. |
Method | Description | |
---|---|---|
deserializeAbilities ( array $abilities ) : Illuminate\Database\Eloquent\Collection | Deserialize an array of abilities into a collection of models. | |
getCacheKey ( |
Get the cache key for the given model's cache type. | |
refreshAllIteratively ( ) : void | Refresh the cache for all roles and users, iteratively. | |
sear ( string $key, callable $callback ) : mixed | Get an item from the cache, or store the default value forever. | |
serializeAbilities ( Illuminate\Database\Eloquent\Collection $abilities ) : array | Serialize a collection of ability models into a plain array. |
public __construct ( Illuminate\Contracts\Cache\Store $cache ) | ||
$cache | Illuminate\Contracts\Cache\Store |
protected deserializeAbilities ( array $abilities ) : Illuminate\Database\Eloquent\Collection | ||
$abilities | array | |
return | Illuminate\Database\Eloquent\Collection |
public getAbilities ( |
||
$authority | ||
$allowed | boolean | |
return | Illuminate\Database\Eloquent\Collection |
public getCache ( ) : Illuminate\Contracts\Cache\Store | ||
return | Illuminate\Contracts\Cache\Store |
public getFreshAbilities ( |
||
$authority | ||
$allowed | boolean | |
return | Illuminate\Database\Eloquent\Collection |
public getRoles ( |
||
$authority | ||
return |
protected refreshAllIteratively ( ) : void | ||
return | void |
public refreshFor ( |
||
$authority |
protected serializeAbilities ( Illuminate\Database\Eloquent\Collection $abilities ) : array | ||
$abilities | Illuminate\Database\Eloquent\Collection | |
return | array |
public setCache ( Illuminate\Contracts\Cache\Store $cache ) | ||
$cache | Illuminate\Contracts\Cache\Store |
protected Store,Illuminate\Contracts\Cache $cache | ||
return | Illuminate\Contracts\Cache\Store |