0

I want to create a admin dashboard with Laravel Breeze (React) and using the Spatie/laravel-permissions, I created a new project with Laravel Breeze (React) and install the Spatie/laravel-permissions.

I also assigned the role to the current user in my Database Seeder, but now how to hide the specific button in different admin roles?

I do some research about that, they using @role('admin') and @endrole, but i have error tag in my react components, here's my react components code:

@role('admin')
    <button>Edit</button>
@endrole

Please help me ~

apokryfos
  • 38,771
  • 9
  • 70
  • 114

0 Answers0