statistic on separate page wip

This commit is contained in:
salam committed 2026-04-28 16:50:23 +02:00
1 parent ad36ba555f
commit 422681df01
34 files changed
+660 -734

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class StatisticFixtures extends Model
{
protected $fillable = [
'sport_id',
'league_id',
'home_id',
'away_id',
'starttime',
'exp_home',
'exp_away',
];
protected function casts(): array
{
return [
'starttime' => 'date',
];
}
public function sport()
{
return $this->belongsTo(Sport::class)->where('is_active', 1);
}
public function league()
{
return $this->belongsTo(CompetitionGroup::class);
}
public function home()
{
return $this->belongsTo(Element::class);
}
public function away()
{
return $this->belongsTo(Element::class);
}
}