fixtures new wip
This commit is contained in:
1 parent
a1057d55a7
commit
69619802ce
27 files changed
+156
-187
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\Logifuture\Tools;
|
||||
|
||||
use App\Console\Commands\Nuh;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class MapEvent
|
||||
{
|
||||
public static function filter($sport_id, $match)
|
||||
{
|
||||
|
||||
$event = [];
|
||||
$event['event_id'] = (int) $match['id'];
|
||||
$event['bookmaker_id'] = Nuh::$options['bookmaker_id'];
|
||||
$event['betradar_id'] = (int) preg_replace('"\D"', '', $match['externalId']);
|
||||
$event['sport_id'] = $sport_id;
|
||||
$event['provider_id'] = Nuh::$options['provider_id'];
|
||||
$event['starttime'] = Carbon::parse($match['startDate'])->toDateTimeString();
|
||||
$event['country'] = $match['sportCategory'];
|
||||
$event['group_id'] = (int) $match['tournamentId'];
|
||||
$event['group'] = addslashes($match['tournamentName']);
|
||||
|
||||
$str = str_replace('||', '|', $match['description']);
|
||||
$str = trim(str_replace('|', ' ', $str));
|
||||
if (Nuh::$options['bookmaker_id'] == 36) {
|
||||
$teams = explode(' v ', $str);
|
||||
} else {
|
||||
$teams = explode(' - ', $str);
|
||||
}
|
||||
$event['home'] = addslashes($teams[0]);
|
||||
$event['away'] = addslashes($teams[1]);
|
||||
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user