Shipping method
Route
Route::post('/registration',['uses'=>' AppController@getregistration ','as'=>'registration']);
View
{!!Form::open(array('url' => '/registration')) !!} {!! Form::hidden('course_id', '1') !!} {!! Form::submit('registration') !!} {!! Form::close() !!}
controller
public function getregistration(Request $request) { $course_id = $request->input('course_id'); return view('index')->with('course_id',$course_id); }
Get method
use the encryption method, it will show the encrypted identifier in the URL
View
<li> <a href="{{route('registration',['course_id' => Crypt::encrypt('1') ])}}">A</a> </li>
controller
public function getregistration($course_id) { $course_id = Crypt::decrypt($course_id); return view('index')->with('course_id',$course_id); }
source share