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

+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);
}
}
}