public function post() {
$posts = DB::table('posts')->paginate(3);
return view('welcome', ['posts'=>$posts]);
}
public function post() {
$posts = DB::table('posts')->paginate(3);
return view('welcome', compact('posts'));
}
['posts'=>$posts]
compact("posts")