laravel pass view with data
snippet in php

laravel pass view with data

user8778

return view("blog", ["posts"=>$posts]);
Or:
return view("blog", compact("posts"));