51 lines
890 B
PHP
51 lines
890 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Event extends Model
|
|
{
|
|
protected $fillable = [
|
|
'starttime',
|
|
'sport_id',
|
|
'country_id',
|
|
'liga_id',
|
|
'home_id',
|
|
'away_id',
|
|
'provider_id',
|
|
'txodds_id',
|
|
'betaid_id',
|
|
'betradar_id',
|
|
'magnig_id',
|
|
'magken_id',
|
|
'lognig_id',
|
|
'logcol_id',
|
|
];
|
|
|
|
public function sport()
|
|
{
|
|
return $this->belongsTo(Sport::class, 'sport_id', 'id');
|
|
}
|
|
|
|
public function country()
|
|
{
|
|
return $this->belongsTo(Country::class);
|
|
}
|
|
|
|
public function liga()
|
|
{
|
|
return $this->belongsTo(Liga::class);
|
|
}
|
|
|
|
public function home()
|
|
{
|
|
return $this->belongsTo(Element::class);
|
|
}
|
|
|
|
public function away()
|
|
{
|
|
return $this->belongsTo(Element::class);
|
|
}
|
|
}
|