Is it possible to specify a Redirect::route to a Resource Controller with parameters and specify how the parameters are handled?
I have the following route defined:
Route::resource('account','AccountController');
In another route I want to be able to pass parameters to account.create with values acquired earlier so I can pre-populate the create form, but want them passed using as a POST request.
Redirect::route('account.create',array('name' => $name));
The above works, but passes the parameters as a GET request.
Redirect::route('account.create')->with('name', $name);
This'll flash it to the session, which you would then retrieve after the redirect with Session::get('name')
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With