In your Web.php Excluse the api routes and it's will work like this
Route::get('/{any}', function () { return view('app'); })->where('any', '^(?!api).*$');