This commit is contained in:
salam committed 2026-02-22 16:46:41 +01:00
1 parent b4122036ff
commit d356db1d8b
1 file changed
+4 -4
+4 -4
View File
@@ -8,7 +8,7 @@ use Illuminate\Support\Carbon;
class LoadProvider
{
public static function load($search_right, $user)
public static function load($search_values, $user)
{
$res = Event::query()->where('betradar_id', '>', 0)->pluck('betradar_id');
@@ -16,14 +16,14 @@ class LoadProvider
Mapper::where('betradar_id', $betradar_id)->delete();
}
if ($search_right) {
if (is_array($search_values) and \count($search_values)) {
return Mapper::query()
->where('starttime', '>', Carbon::now())
->where('sport_id', $user->sport_id)
->where('provider_id', $user->provider_id)
->where(function ($query) use ($search_right) {
foreach ($search_right as $value) {
->where(function ($query) use ($search_values) {
foreach ($search_values as $value) {
$query->orWhere('home', 'LIKE', '%'.$value.'%')
->orWhere('away', 'LIKE', '%'.$value.'%');
}