| @@ 51-59 (lines=9) @@ | ||
| 48 | /** |
|
| 49 | * @return mixed |
|
| 50 | */ |
|
| 51 | public function playedMatchesHome() |
|
| 52 | {
|
|
| 53 | return $this->hasMany( |
|
| 54 | MatchResult::class, |
|
| 55 | 'home_team_id' |
|
| 56 | )->where('simulated', true)
|
|
| 57 | ->orderBy('updated_at', 'DESC')
|
|
| 58 | ->limit(self::PLAYED_LIMIT); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * @return mixed |
|
| @@ 64-72 (lines=9) @@ | ||
| 61 | /** |
|
| 62 | * @return mixed |
|
| 63 | */ |
|
| 64 | public function futureMatchesHome() |
|
| 65 | {
|
|
| 66 | return $this->hasMany( |
|
| 67 | MatchResult::class, |
|
| 68 | 'home_team_id' |
|
| 69 | )->where('simulated', false)
|
|
| 70 | ->orderBy('updated_at', 'DESC')
|
|
| 71 | ->limit(self::FUTURE_LIMIT); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @return mixed |
|
| @@ 77-85 (lines=9) @@ | ||
| 74 | /** |
|
| 75 | * @return mixed |
|
| 76 | */ |
|
| 77 | public function playedMatchesAway() |
|
| 78 | {
|
|
| 79 | return $this->hasMany( |
|
| 80 | MatchResult::class, |
|
| 81 | 'away_team_id' |
|
| 82 | )->where('simulated', true)
|
|
| 83 | ->orderBy('updated_at', 'DESC')
|
|
| 84 | ->limit(self::PLAYED_LIMIT); |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * @return mixed |
|
| @@ 90-98 (lines=9) @@ | ||
| 87 | /** |
|
| 88 | * @return mixed |
|
| 89 | */ |
|
| 90 | public function futureMatchesAway() |
|
| 91 | {
|
|
| 92 | return $this->hasMany( |
|
| 93 | MatchResult::class, |
|
| 94 | 'away_team_id' |
|
| 95 | )->where('simulated', false)
|
|
| 96 | ->orderBy('updated_at', 'DESC')
|
|
| 97 | ->limit(self::FUTURE_LIMIT); |
|
| 98 | } |
|
| 99 | ||
| 100 | ||
| 101 | /** |
|