I've successfully installed Filament Shield, and setup supser_admin and panel_user roles. The Filament Shield menu items shows and hides when logged in with users of different roles respectively.
Then I installed tomatophp/filament-users, which utilizes the native user model at app/Models/User.php while provides its own user resource. The Users menu item always shows no matter which user is logged in.
How to make the user resource act as the Filament Role? i.e. the Users menu item shows to users of super_admin and hides for other users?
However, I believe that php artisan make:policy is a Laravel command, and I have to write the same logics for more models manually. Is there a way to simplify it via Filament Shield?
I tried php artisan shield:generate --resource=user. It prompted some success message, but nothing really happened.
INFO Successfully generated Permissions & Policies for:
+---+----------+--------+-------------+
| # | Resource | Policy | Permissions |
+---+----------+--------+-------------+
INFO Permission & Policies are generated according to your config or passed options.
INFO Enjoy!