wip
This commit is contained in:
1 parent
b31f3ec005
commit
31a0ccdf3b
6 files changed
+60
-1
No files matched your search
@@ -6,6 +6,7 @@ use App\Console\Commands\Nuh;
|
||||
use App\Console\Commands\Xml;
|
||||
use App\Models\CompetitionGroup;
|
||||
use App\Models\Element;
|
||||
use App\Models\ElementGroup;
|
||||
use App\Models\Event;
|
||||
use App\Models\Group;
|
||||
use App\Models\Sport;
|
||||
@@ -100,15 +101,27 @@ class Fixtures
|
||||
$element = [
|
||||
'name' => (string) $row->hteam,
|
||||
'sport_id' => (int) $sport_id,
|
||||
'country_id' => (int) $row->group['cnid'],
|
||||
];
|
||||
Element::updateOrCreate(['id' => (int) $row->hteam['id']], $element);
|
||||
|
||||
$element_group = [
|
||||
'competition_group_id' => (int) $row->group['cgid'],
|
||||
];
|
||||
ElementGroup::updateOrCreate(['element_id' => (int) $row->hteam['id'], 'group_id' => (int) $row->group['id']], $element_group);
|
||||
|
||||
$element = [
|
||||
'name' => (string) $row->ateam,
|
||||
'sport_id' => (int) $sport_id,
|
||||
'country_id' => (int) $row->group['cnid'],
|
||||
];
|
||||
Element::updateOrCreate(['id' => (int) $row->ateam['id']], $element);
|
||||
|
||||
$element_group = [
|
||||
'competition_group_id' => (int) $row->group['cgid'],
|
||||
];
|
||||
ElementGroup::updateOrCreate(['element_id' => (int) $row->ateam['id'], 'group_id' => (int) $row->group['id']], $element_group);
|
||||
|
||||
if ($sport_id == 1) {
|
||||
$total_soccer++;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user