wip grap ss tournament

This commit is contained in:
salam committed 2026-06-07 07:18:22 +02:00
1 parent d4dfb9748c
commit 292acb879e
31 files changed
+4025 -224

No files matched your search

+20
View File
@@ -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');
}
}
+18
View File
@@ -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',
];
}
+19
View File
@@ -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');
}
}
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SofaScoreEvent extends Model
{
//
}
+28
View File
@@ -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');
}
}
+4
View File
@@ -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'])) {