// you could use the invokable flag so you don't use the index
php artisan make:controller PagesController --invokable
// and then use this route:
Route::get('/{any?}', App\Http\Controllers\PagesController::class)->where('any', '.*');
// it tells Laravel routing to respond to any route provided or nothing with the question mark "?" and responds with an invokable controller
public function __invoke()
{
return view('welcome');
}