Hi I start using vuejs2 with project based on laravel backend
in my vuejs2, I did this code in the file routes.js
export default new VueRouter({
routes: [{
path: '/test',
component: Test
},
{
path: '/settings',
component: Settings
},
// users
{
path: '/users/create',
component: Create
},
// end users
],
});
Now in the line { path: '/users/create', component: Create}, I'm wondering how could I go to controller first and the controller redirect me to the component
like in laravel first think I write in route.php and calling a function in the controller and the controller redirect me to the view vile
what I found that's from the route I go to the component
but I need to do things before redirecting me to the component
thanks a lot.