mapper provider wip

This commit is contained in:
salam committed 2026-01-01 08:01:28 +01:00
1 parent b3318b1c03
commit a487fe0838
11 files changed
+161 -92

No files matched your search

+43
View File
@@ -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;
}
}
}
+14
View File
@@ -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);
}
}