Files
nuhodds_fi4/app/Models/CompetitionGroup.php
T
2025-12-29 19:40:30 +01:00

26 lines
468 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CompetitionGroup extends Model
{
protected $fillable = [
'id',
'name',
'sport_id',
'country_id',
];
public function sport()
{
return $this->belongsTo(Sport::class);
}
public function country()
{
return $this->belongsTo(Country::class, 'country_id', 'tx_id')->where('disabled', 0)->where('is_country', 1);
}
}