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')); }
public function index() { $posts = Post::latest()->get(); return View('admin.posts.index', compact('posts')); }
public function index() { return view('pages.index')->with(['posts' => Post::latest(5), 'index' => true]); }