$mime ]); } else { abort(404); } })->where('path', '.*') ->name('files'); Route::get('/{path?}', function() { return view('app', [ 'title' => 'Speedtest Checker' ]); })->where('path', '^((?!\/api\/).)*$') ->name('react');