pass data on blade laravel compact 2 variable code example Example: laravel pass variables to view return view('home')->with('userName',$userName);