public function admin() { $bios = Biography::orderBy('created_at', 'DESC')->first(); if (!file_exists(public_path() . '/' . $bios->photo_url)) { $bios->photo_url = url('/admin/img/person.png'); } return view('biographies.index', compact('bios')); }
/** * Show the application dashboard to the user. * * @return Response */ public function index() { $images = Gallery::slide(); $news = News::latest(4); $pubs = Publication::latest(); $trainings = Training::latest(); $bio = Biography::orderBy('created_at', 'DESC')->first(); return view('index', compact('images', 'news', 'pubs', 'bio', 'trainings')); }