laravel pass view with data code example
Example: laravel pass view with data
return view("blog", ["posts"=>$posts]);
Or:
return view("blog", compact("posts"));
return view("blog", ["posts"=>$posts]);
Or:
return view("blog", compact("posts"));