Beispiel #1
0
 public function getIndex()
 {
     $posters = Poster::orderBy('created_at', 'DESC')->get();
     return View::make('index', array('posters' => $posters));
 }
 public function sortPosters($direction)
 {
     $posters = Poster::orderBy('created_at', $direction)->get();
     return View::make('posters/all_previews', array('posters' => $posters));
 }