mapper new

This commit is contained in:
salam committed 2026-01-20 08:33:20 +01:00
1 parent fe7fc0accf
commit e27bba1644
12 files changed
+179 -107

No files matched your search

-4
View File
@@ -21,12 +21,9 @@ class LoadEvents
}
})->pluck('id')->toArray();
// dd(Auth::user()->sport_id);
$query = Event::query()
->with('home')
->with('away')
->where('sport_id', Auth::user()->sport_id)
->where('starttime', '>', Carbon::now())
->where(function ($query) use ($element_ids) {
$query->orWhereIn('home_id', $element_ids)->orWhereIn('away_id', $element_ids);
@@ -37,7 +34,6 @@ class LoadEvents
->with('home')
->with('away')
->where('betradar_id', 0)
->where('sport_id', Auth::user()->sport_id)
->where('starttime', '>', Carbon::now());
}
+2 -5
View File
@@ -4,7 +4,6 @@ namespace App\Livewire\Mapper;
use App\Models\Mapper;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
class LoadProvider
{
@@ -15,9 +14,8 @@ class LoadProvider
$searchValues = preg_split('/\s+/', $search_right, -1, PREG_SPLIT_NO_EMPTY);
return Mapper::query()
->where('sport_id', Auth::user()->sport_id)
->where('starttime', '>', Carbon::now())
->where('provider_id', Auth::user()->provider_id)
->where('provider_id', auth()->user()->provider_id)
->where(function ($query) use ($searchValues) {
foreach ($searchValues as $value) {
$query->orWhere('home', 'LIKE', '%'.$value.'%')
@@ -26,9 +24,8 @@ class LoadProvider
});
} else {
return Mapper::query()
->where('sport_id', Auth::user()->sport_id)
->where('starttime', '>', Carbon::now())
->where('provider_id', Auth::user()->provider_id);
->where('provider_id', auth()->user()->provider_id);
}
}
}