Skip to content

Commit

Permalink
Merge pull request #3 from juhniorsantos/master
Browse files Browse the repository at this point in the history
remove buggy static modifier
  • Loading branch information
rodrigopedra authored Mar 8, 2024
2 parents 47cb732 + e7b4e84 commit 1f06297
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/HasACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
);
}

Expand Down

0 comments on commit 1f06297

Please sign in to comment.