laravel get parameters from url code example
Example 1: how to get variable from url in laravel
request('variable')
Example 2: laravel get all request parameters
$request->input('name');
$request->input('user.name');
Example 3: how to see with page reuested in laravel
$request->fullUrl()
Example 4: laravel get url parameters in controller
public function update($name)
{
User::where('name', $name)->first();
return view('test')->with('user', $user);
}
Example 5: laravel get url parameters in controller
Route::put('user/{name}', 'UserController@show');