fixtures new wip

This commit is contained in:
salam committed 2026-01-16 07:42:33 +01:00
1 parent a1057d55a7
commit 69619802ce
27 files changed
+156 -187

No files matched your search

@@ -0,0 +1,24 @@
<?php
namespace App\Console\Commands\Grapper\Fixtures;
use App\Models\ElementProvider;
class LoadElements
{
public static function load($provider_id, $load_by_name = false)
{
$res = ElementProvider::where('provider_id', $provider_id)->get();
$r = [];
foreach ($res as $val) {
if ($load_by_name) {
$r[$val->sport_id][$val->name] = $val->element_id;
} else {
$r[$val->sport_id][$val->provider_element_id] = $val->element_id;
}
}
return $r;
}
}