Route

Laravel Route

Catch all the rest uri argument on route

You can define a catch-all route that will match any URI pattern by using the {any?} parameter.

Route::any('{any?}', function ($any = null) {
    return view('your-view', compact('any'));
})->where('any', '.*');