statistic on separate page wip
This commit is contained in:
1 parent
ad36ba555f
commit
422681df01
34 files changed
+660
-734
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user