Skip to content

Commit 56f59b5

Browse files
Update README.md
1 parent 57e1cd2 commit 56f59b5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function tools()
3939
}
4040
```
4141

42-
Finally, add `MorphToMany` fields to you `app/Nova/User` resource:
42+
Next, add `MorphToMany` fields to you `app/Nova/User` resource:
4343

4444
```php
4545
use Laravel\Nova\Fields\MorphToMany;
@@ -54,6 +54,20 @@ public function fields(Request $request)
5454
}
5555
```
5656

57+
Finally, add the `ForgetCachedPermissions` class to your `config/nova.php` middleware like so:
58+
59+
```php
60+
// in config/nova.php
61+
'middleware' => [
62+
'web',
63+
Authenticate::class,
64+
DispatchServingNovaEvent::class,
65+
BootTools::class,
66+
Authorize::class,
67+
\Insenseanalytics\LaravelNovaPermission\ForgetCachedPermissions::class,
68+
],
69+
```
70+
5771
## Using Custom Role/Permission Resource Classes
5872

5973
If you want to use custom resource classes you can define them when you register a tool:

0 commit comments

Comments
 (0)