mapper provider wip
This commit is contained in:
1 parent
b3318b1c03
commit
a487fe0838
11 files changed
+161
-92
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\Event;
|
||||
|
||||
class MapperEvents
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
switch (auth()->user()->provider_id) {
|
||||
case 2:
|
||||
// BETSAPI
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('betsapi_id', 0);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
// Magloo Kenia
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('magnig_id', 0);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
// Magloo Nigeria
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('magken_id', 0);
|
||||
break;
|
||||
|
||||
case 26:
|
||||
// Logifuture Nigeria
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('lognig_id', 0);
|
||||
break;
|
||||
|
||||
case 27:
|
||||
// Magloo Colombia
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('logcol_id', 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\Mapper;
|
||||
|
||||
class MapperProvider
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
|
||||
return Mapper::query()->where('sport_id', auth()->user()->sport_id)->where('provider_id', auth()->user()->provider_id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user