/** * Display a listing of the resource. * GET /games * * @return Response */ public function index() { $games = Game::where('open', '=', 1)->get(); return $games; }
public function index() { $availableGames = Game::where('open', '=', 1)->get(); return View::make('pages.lobby.index')->withSectionTitle('Lobby')->withAvailableGames($availableGames); }