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

inmn's avatar
Level 2

How should i handle roles type middleware with vue?

Lets say I have an isAdmin type function for modifying this Account; (not all users are admins of all accounts)

With Rest, the validation should be done as part of the rest request, right? So lets say i have a user / token; it id's them, then determines if user can access this resource;

With vue, should I still use that mentality? Or should i use the User functionality of a logged in laravel session and remove the user / tokens from the request?

Is there a reason to do it one way or another?

0 likes
0 replies

Please or to participate in this conversation.