PHP Class Spatie\Permission\PermissionRegistrar

显示文件 Open project: spatie/laravel-permission Class Usage Examples

Protected Properties

Property Type Description
$cache Illuminate\Contracts\Cache\Repository
$cacheKey string
$gate Illuminate\Contracts\Auth\Access\Gate

Public Methods

Method Description
__construct ( Illuminate\Contracts\Auth\Access\Gate $gate, Illuminate\Contracts\Cache\Repository $cache )
forgetCachedPermissions ( ) Forget the cached permissions.
registerPermissions ( ) : boolean Register the permissions.

Protected Methods

Method Description
getPermissions ( ) : Illuminate\Database\Eloquent\Collection Get the current permissions.

Method Details

__construct() public method

public __construct ( Illuminate\Contracts\Auth\Access\Gate $gate, Illuminate\Contracts\Cache\Repository $cache )
$gate Illuminate\Contracts\Auth\Access\Gate
$cache Illuminate\Contracts\Cache\Repository

forgetCachedPermissions() public method

Forget the cached permissions.

getPermissions() protected method

Get the current permissions.
protected getPermissions ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection

registerPermissions() public method

Register the permissions.
public registerPermissions ( ) : boolean
return boolean

Property Details

$cache protected_oe property

protected Repository,Illuminate\Contracts\Cache $cache
return Illuminate\Contracts\Cache\Repository

$cacheKey protected_oe property

protected string $cacheKey
return string

$gate protected_oe property

protected Gate,Illuminate\Contracts\Auth\Access $gate
return Illuminate\Contracts\Auth\Access\Gate