how to pass variable value from view to controller in laravel code example Example: laravel pass variables to view return view('home')->with('userName',$userName);