grapper betsapi fixtures
This commit is contained in:
1 parent
cec5a5e2f7
commit
e90a6c71f6
18 files changed
+3335
-3054
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mapper;
|
||||
|
||||
use App\Models\CompetitionGroupProvider;
|
||||
|
||||
class StoreGroup
|
||||
{
|
||||
public static function store(&$groups, $group)
|
||||
{
|
||||
$provider_group_id = $group['provider_group_id'] ?? 0;
|
||||
|
||||
unset($group['provider_group_id']);
|
||||
|
||||
$sport_id = $group['sport_id'] ?? 0;
|
||||
|
||||
if (! isset($groups[$sport_id][$provider_group_id])) {
|
||||
|
||||
CompetitionGroupProvider::updateOrCreate(['provider_group_id' => (int) $provider_group_id], $group);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user