belongsTo(ZqMatch::class, 'match_id', 'match_id'); } public function getJcHomeTeamNameAttribute() { if ($this->is_reverse == 1) { return $this->attributes['jc_away_team_name']; } return $this->attributes['jc_home_team_name']; } public function getJcHomeTeamNameFullAttribute() { if ($this->is_reverse == 1) { return $this->attributes['jc_away_team_name_full']; } return $this->attributes['jc_home_team_name_full']; } public function getJcAwayTeamNameAttribute() { if ($this->is_reverse == 1) { return $this->attributes['jc_home_team_name']; } return $this->attributes['jc_away_team_name']; } public function getJcAwayTeamNameFullAttribute() { if ($this->is_reverse == 1) { return $this->attributes['jc_home_team_name_full']; } return $this->attributes['jc_away_team_name_full']; } public function getHomeOddsAttribute($key) { return ['0', '1', '2', '3+']; } public function getAwayOddsAttribute($key) { return ['0', '1', '2', '3+']; } }