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

kevin73's avatar

problem for authentifaction API with vuejs and laravel

Hi , I use backpack the laravel framework to generate crud in less time, so practically everything has been generated and is managed in PHP and Ajax. but I created some pages using Vuejs. The problem, the routes created and used to manage the data of pages made in Vuejs are not secure. I mean they don't have authentication, I was wondering what would be the best approach to handle this case, I need your recommendations. thank you in advance

0 likes
1 reply
Zyberg's avatar

@kevin73 Why not simply create an auth middleware and handpick routes that need to be authenticated? Or, if you have a SPA, use websanova/vue-auth and check in specific routes, whether they should be allowed or not.

Please or to participate in this conversation.