diff options
Diffstat (limited to 'app/Rugby/Model/Match.php')
| -rw-r--r-- | app/Rugby/Model/Match.php | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/app/Rugby/Model/Match.php b/app/Rugby/Model/Match.php index 58a3dd9..38d58d8 100644 --- a/app/Rugby/Model/Match.php +++ b/app/Rugby/Model/Match.php @@ -47,14 +47,14 @@ class Match extends Model          return $video->getUrl();      } -    public function homeTeam() +    public function getHomeTeam()      { -        return $this->teams()->wherePivot('is_home', '=', true); +        return $this->teams()->wherePivot('is_home', '=', true)->first();      } -    public function awayTeam() +    public function getAwayTeam()      { -        return $this->teams()->wherePivot('is_home', '=', false); +        return $this->teams()->wherePivot('is_home', '=', false)->first();      }      public function tournaments() @@ -66,5 +66,4 @@ class Match extends Model      {          return $this->hasMany(Video::class, 'match_id');      } -  } | 
