File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public function tools()
39
39
}
40
40
```
41
41
42
- Finally , add ` MorphToMany ` fields to you ` app/Nova/User ` resource:
42
+ Next , add ` MorphToMany ` fields to you ` app/Nova/User ` resource:
43
43
44
44
``` php
45
45
use Laravel\Nova\Fields\MorphToMany;
@@ -54,6 +54,20 @@ public function fields(Request $request)
54
54
}
55
55
```
56
56
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
+
57
71
## Using Custom Role/Permission Resource Classes
58
72
59
73
If you want to use custom resource classes you can define them when you register a tool:
You can’t perform that action at this time.
0 commit comments