This commit is contained in:
salam committed 2026-02-22 17:45:01 +01:00
1 parent 64f9c6865d
commit 0c1c4a63cd
2 files changed
+6 -6

No files matched your search

+5 -5
View File
@@ -8,7 +8,7 @@ use Illuminate\Support\Carbon;
class LoadProvider
{
public static function load($search_values, $user)
public static function load($search_values)
{
$res = Event::query()->where('betradar_id', '>', 0)->pluck('betradar_id');
@@ -20,8 +20,8 @@ class LoadProvider
return Mapper::query()
->whereDate('starttime', '>', Carbon::now())
->where('sport_id', $user->sport_id)
->where('provider_id', $user->provider_id)
->where('sport_id', auth()->user()->sport_id)
->where('provider_id', auth()->user()->provider_id)
->where(function ($query) use ($search_values) {
foreach ($search_values as $value) {
$query->orWhere('home', 'LIKE', '%'.$value.'%')
@@ -32,8 +32,8 @@ class LoadProvider
} else {
return Mapper::query()
->whereDate('starttime', '>', Carbon::now())
->where('sport_id', $user->sport_id)
->where('provider_id', $user->provider_id);
->where('sport_id', auth()->user()->sport_id)
->where('provider_id', auth()->user()->provider_id);
}
}
}