wip grap ss tournament
This commit is contained in:
1 parent
d4dfb9748c
commit
292acb879e
31 files changed
+4025
-224
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScoreCategorie extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'name',
|
||||
'slug',
|
||||
'country_id',
|
||||
];
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo(Country::class, 'country_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScoreDay extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'day',
|
||||
'football',
|
||||
'basketball',
|
||||
'tennis',
|
||||
'ice-hockey',
|
||||
'handball',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScoreDayTournament extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'tournament_id',
|
||||
'day',
|
||||
];
|
||||
|
||||
public function tournament()
|
||||
{
|
||||
return $this->belongsTo(SofaScoreTournament::class, 'tournament_id', 'tournament_id');
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScoreEvent extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class SofaScoreTournament extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'sport_id',
|
||||
'tournament_id',
|
||||
'sofa_score_categorie_id',
|
||||
'name',
|
||||
'slug',
|
||||
'grap',
|
||||
];
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class);
|
||||
}
|
||||
|
||||
public function sofascore_category()
|
||||
{
|
||||
return $this->belongsTo(SofaScoreCategorie::class, 'sofa_score_categorie_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Sport extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'ss_grap_years',
|
||||
];
|
||||
|
||||
public static function map(string $field, $reverse = false, $limit = [])
|
||||
{
|
||||
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl', 'sofascore'])) {
|
||||
|
||||
Reference in new issue
Block a user