I am trying to use vue routes and laravel routes in a same application, but I am having problem with creating a 404 page.
I created a 404 page with vue but it will show up in all laravel routes.
My laravel routes->web.php
Route::resources([
'patient' => 'PatientController',
]);
//for vue router
Route::get('/{any}', 'HomeController@index')->where('any', '.*');
And my Vue Routes
let routes = [
{ path: '/dashboard', component: require('./views/Dashboard').default },
{ path: '/developer', component: require('./views/Developer').default },
{ path: '/profile', component: require('./components/Profile').default },
{ path: '/users', component: require('./components/Users').default },
// { path: '*', component: require('./views/404').default },
]
How do i get a 404 page that works with both laravel and Vue routes?
Thanks
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire