events wip
This commit is contained in:
1 parent
8d623755ca
commit
a7e09c6590
25 files changed
+1112
-384
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\TxOdds\Fixtures;
|
||||
|
||||
use App\Models\Country;
|
||||
|
||||
class TxCountries
|
||||
{
|
||||
public static function get($group)
|
||||
{
|
||||
|
||||
// "group": {
|
||||
// "@attributes": {
|
||||
// "id": "177425",
|
||||
// "cgid": "336",
|
||||
// "spid": "1",
|
||||
// "cnid": "381",
|
||||
// "mgid": "1373",
|
||||
// "cname": "UEFA Women's Champions League"
|
||||
// },
|
||||
// "@text": "WFBECUP UEFA Women's Champions League > Qualifying Rounds-25"
|
||||
// },
|
||||
|
||||
$cnid = array_column($group, 'cnid');
|
||||
$cname = array_column($group, 'cname');
|
||||
|
||||
$country = Country::firstOrCreate(
|
||||
['txid' => $cnid[0]],
|
||||
['name' => $cname[0]]
|
||||
);
|
||||
|
||||
return $cnid[0];
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Console\Commands\Grapper\TxOdds\Fixtures;
|
||||
|
||||
use App\Console\Commands\NuhBash;
|
||||
use App\Models\Country;
|
||||
use App\Models\Liga;
|
||||
|
||||
class TxLigas
|
||||
@@ -12,12 +11,10 @@ class TxLigas
|
||||
{
|
||||
$debug = NuhBash::$options['debug'] ?? 0;
|
||||
|
||||
$cgid = array_column($group, 'cgid');
|
||||
$cnid = array_column($group, 'cnid');
|
||||
$spid = array_column($group, 'spid');
|
||||
$cname = array_column($group, 'cname');
|
||||
|
||||
$country_id = Country::where('txid', $cnid)->value('id');
|
||||
$spid = array_column($group, 'spid');
|
||||
$country_id = TxCountries::get($group);
|
||||
$cgid = array_column($group, 'cgid');
|
||||
|
||||
$liga = Liga::firstOrCreate([
|
||||
'name' => (string) $cname[0],
|
||||
|
||||
Reference in new issue
Block a user