Beispiel #1
0
 public function index()
 {
     $posts = Post::latest('published_at')->published()->get();
     $title = Lang::get('posts.index.title');
     $header = Lang::get('posts.index.header');
     return View('posts.index', compact('posts', 'title', 'header'));
 }
Beispiel #2
0
 public function index()
 {
     $posts = Post::latest()->get();
     return View('admin.posts.index', compact('posts'));
 }
Beispiel #3
0
 public function index()
 {
     return view('pages.index')->with(['posts' => Post::latest(5), 'index' => true]);
 }