I'm building a SPA with Laravel and Vue. However, I need to make an API call with axios but it's not working.
Here's my web.php:
Route::get('/{any}', function () {
return view('index');
})->where('any', '.*');
Here's my api.php route:
Route::get('/notification', 'NotificationController@index');
Whenever I make an API call, it shows a blank or broken page.
Could you please give me any suggestion about this issue and solve?
Route::get('/{any}'...with Route::fallback laravel.com/docs/8.x/routing#fallback-routes{any}justRoute::fallback(function(){return ...})