Beispiel #1
0
 public function all()
 {
     return view('news.list', ['news' => News::orderBy('updated_at', 'DESC')->get(), 'categories' => Category::all()]);
 }
Beispiel #2
0
 public function home()
 {
     return view('home', ['news' => News::orderBy('created_at', 'DESC')->limit(4)->get()]);
 }