public function getHighlights($match) { $match = Match::find($match); $firstTeam = new TeamRepository(Team::find($match->first_team_id)); $secondTeam = new TeamRepository(Team::find($match->second_team_id)); return view("match", compact("match", "firstTeam", "secondTeam")); }
public static function createMatch($league, $firstTeam, $secondTeam, $starts) { return Match::create(['League_ID' => $league, 'first_team_id' => $firstTeam, 'second_team_id' => $secondTeam, 'starts' => $starts]); }