get url parameter laravel code example
Example 1: get value mentthod get laravel
Input::get('lastName') ;
//lastName is variable in view
Example 2: laravel get all request parameters
$request->input('name');
$request->input('user.name'); // fetch from user object
Example 3: laravel get url parameters in controller
public function update($name)
{
User::where('name', $name)->first();
return view('test')->with('user', $user);
}
Example 4: laravel get url parameters in controller
Route::put('user/{name}', 'UserController@show');