public function showWelcome() { $posters = Poster::all(); $columns = EnlightenColumn::orderBy('created_at', 'desc')->take(8)->get(); $backstages = BackStage::orderBy('created_at', 'desc')->take(8)->get(); $contacts = ContactUs::all(); if (count($contacts) != 0) { $contact = $contacts[0]; return View::make('home.home', array('posters' => $posters, 'columns' => $columns, 'backstages' => $backstages, 'contact' => $contact, 'links' => $this->link())); } else { return View::make('home.home', array('posters' => $posters, 'columns' => $columns, 'backstages' => $backstages, 'links' => $this->link())); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { $all_posters = Poster::all(); return View::make('posters.index')->with('all_posters', $all_posters); }