function getVoteResults() { if (!Auth::check()) { return Redirect::to('/login'); } if (!Auth::user()->canBuySongs()) { return Redirect::to('/'); } if (Input::get('uitgestemd')) { $songs = Song::whereVoted(true)->orderBy('updated_at', 'desc')->get(); } else { $songs = Song::votedYes()->get(); } return View::make('songs.votes', array('javascripts' => array('emptor'), 'songs' => $songs)); }