public function getIndex() { $posts = Post::orderBy('created_at', 'desc')->take(5)->get(); $products = Product::orderBy('created_at', 'desc')->take(5)->get(); $references = Reference::orderBy('created_at', 'desc')->take(5)->get(); return view('admin/index', ['posts' => $posts, 'products' => $products, 'references' => $references]); }
public function getShowAll() { $references = Reference::orderBy('created_at', 'desc')->get(); return view('reference/showall', ['references' => $references]); }
/** * Displays an index of all references * * @return View List template for references */ public function index() { $references = Reference::orderBy('author_last', 'asc')->get(); return view('references.list', compact('references')); }