Redirect::route('profile') and with() in laravel
snippet in php

Redirect::route('profile') and with() in laravel

user1043

// For a route with the following URI: profile/{id}

return redirect()->route('profile', [$user]);

Redirect::route('profile') and with() in laravel

user3110

// For a route with the following URI: profile/{id}

return redirect()->route('profile', ['id' => 1]);