I am trying to call a laravel route Route::get('/logout', 'Auth\LoginController@logout');
that will logout the user and redirect to the login page, but when I try to redirect to this url it won't work, anything happens, just like it was calling a vue router route, but this route does not exists in my router.js
.
This is my route configuration to vue routes:
Route::get('/{vue_capture?}', function () {
return view('index');
})->where('vue_capture', '^(?!storage).*$');
and this is my router.js
:
//import ...
Vue.use(Router)
export default new Router({
mode: 'history',
routes: [{
path: '/',
component: Inicio
}, {
path: '/viagens/cadastrar',
component: Cadastrar
}, {
path: '/viagens/listar',
component: Listar
}]
})
There's not a /logout
route in my route.js
, so why it is not calling my laravel route??