return view("blog", ["posts"=>$posts]); Or: return view("blog", compact("posts"));
Route::get('/', function () { return view('greeting', ['name' => 'James']); });
return view('home')->with('userName',$userName);