ADD GRAPPER BETICA GOLDBET WIP
This commit is contained in:
1 parent
9cf4b5ffd1
commit
128d3e5d99
7 files changed
+131
-28
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Services\Tasks;
|
||||
|
||||
use App\Console\Commands\Nuh;
|
||||
use App\Console\Commands\Xml;
|
||||
use App\Models\TxoddsMarket;
|
||||
use App\Utilities\Notice;
|
||||
|
||||
class CallTxoddsMarkets
|
||||
{
|
||||
public static function call()
|
||||
{
|
||||
$debug = Nuh::$options['d'] ?? 0;
|
||||
|
||||
if ($debug) {
|
||||
Notice::note('TxoddsMarkets', 'b');
|
||||
}
|
||||
|
||||
$url = 'https://xml2.txodds.com/feed/odds_types.php';
|
||||
|
||||
$data = Xml::load($url);
|
||||
|
||||
foreach ($data as $row) {
|
||||
|
||||
$market = [
|
||||
'shortname' => $row->sname,
|
||||
'name' => (string) $row->name,
|
||||
];
|
||||
|
||||
TxoddsMarket::updateOrCreate(['market_id' => (int) $row->ot], $market);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user