Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chrischina's avatar

Laravel Vue Axios : Roles et Permissions

I am using a Laravel Vue Axios stack for a n app with a dashboard. I must limit access and visibility to some parts of the applications depending on the user roles and permission; Should I use only Spatie, only Websanova or both combined together ?

0 likes
5 replies
bugsysha's avatar

You can use policies which are built in to Laravel.

bugsysha's avatar

With every response, you can return what the user can and can not do. Or if you are using VueRouter you can check if the response is HTTP_FORBIDDEN (403) and act on that, show some message, or whatever is appropriate in your scenario.

bugsysha's avatar

Too much code would be required to illustrate it. You need to start somewhere. Once you get stuck ask for help.

Please or to participate in this conversation.