The proper way to send the parameter
to the view is:
return View::make('viewname')->with('code', $code);
Or you may use:
return View::make('yourview', compact('code'));
So, the $code
will be available in your view and you may use it in your form but you may also use following approach to access a parameter
in the view:
// Laravel - Latest (use any one)
Route::Input('code');
Route::current()->getParameter('code');
Route::getCurrentRoute()->getParameter('code');
// Laravel - 4.0
Route::getCurrentRoute()->getParameter('code');