mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Change the cache key call to a static property
This commit is contained in:
parent
f5eb95e16b
commit
a28b5675ac
1 changed files with 2 additions and 2 deletions
|
|
@ -35,14 +35,14 @@ Next, add the following listeners to the `TenancyBootstrapped` and `TenancyEnde
|
|||
Events\TenancyBootstrapped::class => [
|
||||
function (Events\TenancyBootstrapped $event) {
|
||||
$permissionRegistrar = app(\Spatie\Permission\PermissionRegistrar::class);
|
||||
$permissionRegistrar->cacheKey = 'spatie.permission.cache.tenant.' . $event->tenancy->tenant->getTenantKey();
|
||||
$permissionRegistrar::$cacheKey = 'spatie.permission.cache.tenant.' . $event->tenancy->tenant->getTenantKey();
|
||||
}
|
||||
],
|
||||
|
||||
Events\TenancyEnded::class => [
|
||||
function (Events\TenancyEnded $event) {
|
||||
$permissionRegistrar = app(\Spatie\Permission\PermissionRegistrar::class);
|
||||
$permissionRegistrar->cacheKey = 'spatie.permission.cache';
|
||||
$permissionRegistrar::$cacheKey = 'spatie.permission.cache';
|
||||
}
|
||||
],
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue