public function getTeam($id) { $team = TeamModel::getTeamById($id); if (empty($team)) { return array('error' => 'Team not found!'); } $teamMatches = MatchModel::getTeamMatches($id); return array('team' => $team[0], 'matches' => $teamMatches); }
public function showTeam($id) { $team = TeamModel::getTeamById($id); if (empty($team)) { return View::make('error', array('error' => 'Team not found!')); } $teamMatches = MatchModel::getTeamMatches($id); return View::make('team', array('team' => $team, 'matches' => $teamMatches)); }