0

Using the default laravel 9 user model and migration I registered several users (names, emails and passwords). I followed this guide.

But what I really want is to have one administrator user who will be able to assign dynamically roles and permissions to those users. For this purpose I finally abandoned the previous implementation and reinstalled laravel (also cleared database from migrations). I tried with this guide using the Spatie package. During this implementation I needed to install node.js on my pc in order to run

npm install && npm run dev

commands.

The code works but sometimes fails. There is also need to have node.js console running in order to work. If I close console the code does not work. I find the second guide too complex. Is there simpler way to implement this? I just want the administrator to assign roles to created users and grant access to one specific route. Can I somehow do it using the initial implementation?

Thank you a lot for your time!

1 Answer 1

0

about role check is

Laravel middleware with multiple roles

try laragon and if you using tailwind you need to run npm run dev to load ng latest edit and try npm run watch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.