Betaspi Grapper Bet365 per sport
This commit is contained in:
1 parent
1ac74e3e4f
commit
676eecd3ca
15 files changed
+513
-356
No files matched your search
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\DbMapper\Tasks\Helper;
|
||||
|
||||
use App\Models\CountriesItalian;
|
||||
use App\Models\Country;
|
||||
|
||||
class FindCountry
|
||||
{
|
||||
public static function run(&$event)
|
||||
{
|
||||
if ($event['provider_id'] == 10) {
|
||||
// GOLDBET
|
||||
$country = CountriesItalian::where('it', $event['country'])->value('en');
|
||||
|
||||
$event['txodds_country_id'] = Country::where('name', $country)->value('id');
|
||||
} else {
|
||||
|
||||
$country = self::fix_country($event['country']);
|
||||
|
||||
$event['txodds_country_id'] = Country::where('name', $country)->value('id');
|
||||
}
|
||||
}
|
||||
|
||||
public static function fix_country($country)
|
||||
{
|
||||
switch ($country) {
|
||||
case 'Internazionale':
|
||||
case 'International Club':
|
||||
case 'Internazionali Di Club':
|
||||
case 'FIBA Intercontinental Cup':
|
||||
return 'International';
|
||||
case 'Euro Cup':
|
||||
case 'Euro Cup Women':
|
||||
case 'Euroleague':
|
||||
case 'Euroleague Women':
|
||||
return 'Europe';
|
||||
case 'WNBA':
|
||||
return 'USA';
|
||||
default:
|
||||
return $country;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user