Answer the question
In order to leave comments, you need to log in
Why is it giving 404 when routing Vue + laravel?
there is a router in laravel
Route::get('/{any?}', function () {
return view('admin.index');
});
{
path: '/faq',
component: () => import('../Pages/Faq.vue'),
name: '/admin/faq',
},
{
path: '/admin/faq/create',
component: () => import('../Pages/Forms/Faq/Create.vue'),
name: 'faq-create',
},
{
path: '/admin/faq/edit',
component: () => import('../Pages/Forms/Faq/Create.vue'),
name: 'faq-edit',
},
http://site.test:8000/ad/faq
, when refreshing the page, everything is OK, but with this it http://site.test:8000/ad/faq/create
gives 404
Answer the question
In order to leave comments, you need to log in
Try this
Route::get('/{any?}', function () {
return view('admin.index');
})->where('any', '.*');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question