diff --git a/README.md b/README.md index 65af245..3daf011 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ $user->attachRole(Role::hasLabel('admin')->first()); $user->detachRole(Role::hasLabel('leader')->first()); ``` -If you add the `RodrigoPedra\LaravelSimpleACL\Http\Middleware\LoadSimpleACL` middleware +If you add the `\RodrigoPedra\LaravelSimpleACL\Http\Middleware\LoadSimpleACL` middleware to your middleware stack, you can use Laravel's gate to check for permissions: ```php diff --git a/src/Concerns/HasACL.php b/src/Concerns/HasACL.php index cec496b..745f4a9 100644 --- a/src/Concerns/HasACL.php +++ b/src/Concerns/HasACL.php @@ -130,12 +130,12 @@ public function loadACLCache(): void { $this->setRelation( 'roles', - Cache::rememberForever($this->makeACLCacheKey('roles'), static fn () => $this->roles()->get()), + Cache::rememberForever($this->makeACLCacheKey('roles'), fn () => $this->roles()->get()), ); $this->setRelation( 'permissions', - Cache::rememberForever($this->makeACLCacheKey('permissions'), static fn () => $this->permissions()->get()), + Cache::rememberForever($this->makeACLCacheKey('permissions'), fn () => $this->permissions()->get()), ); }