Redirect :: route (profile) и с () в Laravel
// For a route with the following URI: profile/{id}
return redirect()->route('profile', [$user]);
Lucky Loris
// For a route with the following URI: profile/{id}
return redirect()->route('profile', [$user]);
use App\Http\Controllers\HomeController;
return redirect()->action([HomeController::class, 'index']);
// For a route with the following URI: profile/{id}
return redirect()->route('profile', ['id' => 1]);
return redirect()->action([controllerPath::class, 'classMethod'], ['dataParameter' => 'if exist']);