pass data into view in laravel 8 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"));