I am developing an website with simple landing, news and contact as frontend (using php is more that sufficient enough.. vuejs would be overkill...) and vue js as backend. Trying to send all request from /admin/* to view('admin'), this is the best I could come up with:
Route::prefix('admin')->group(function () {
Route::any('{query}', function() {
return view('admin');
})->where('query', '.*');
});
In route:list, it seems listed well and (with hope) it should works to. But what I get was 404 - not found (standard laravel errorpage which I hope was supposed to be handled by vuejs and not laravel since it was in the back end. No error recorded at all in apache log and neither in laravel log. Where did I do wrong?
//This project was basically done in lumen but lumen had the same problem. Tried it with laravel since laravel was the father of lumen, but seems to have same response. Am I missing something?