When attempting to invoke a Laravel route
Route::get('/logout', 'Auth\LoginController@logout');
to log out the user and redirect to the login page, I encounter an issue. It seems like when trying to redirect to this URL, nothing happens; almost as if it is calling a Vue router route that does not exist in my router.js
.
My current route configuration for Vue routes is as follows:
Route::get('/{vue_capture?}', function () {
return view('index');
})->where('vue_capture', '^(?!storage).*$');
Additionally, this is how my router.js
looks:
//import ...
Vue.use(Router)
export default new Router({
mode: 'history',
routes: [{
path: '/',
component: Inicio
}, {
path: '/viagens/cadastrar',
component: Cadastrar
}, {
path: '/viagens/listar',
component: Listar
}]
})
As there is no /logout
route specified in my route.js
, I am confused as to why the Laravel route is not being called properly.