コード例 #1
0
 public function blog()
 {
     $posts = Blog::paginate(10);
     return view('bloghome')->with('posts', $posts);
 }
コード例 #2
0
ファイル: BlogController.php プロジェクト: andy-am/itam
 /**
  * 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]);
 }