public function blog()
 {
     $posts = Blog::paginate(10);
     return view('bloghome')->with('posts', $posts);
 }
示例#2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $blogs = Blog::paginate(10);
     return view('blog.index', compact('blogs'));
 }
示例#3
0
 public function allposts()
 {
     $posts = Blog::paginate(5);
     return view('blog.allposts')->with(['posts' => $posts]);
 }