wip
This commit is contained in:
1 parent
66e26323a4
commit
916fbbc3b2
2 files changed
+1
-7
No files matched your search
@@ -5,7 +5,6 @@ namespace App\Livewire\Mapper;
|
|||||||
use App\Models\Element;
|
use App\Models\Element;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class LoadEvents
|
class LoadEvents
|
||||||
@@ -29,7 +28,6 @@ class LoadEvents
|
|||||||
->with('home')
|
->with('home')
|
||||||
->with('away')
|
->with('away')
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
->where('sport_id', auth()->user()->sport_id)
|
||||||
->whereDate('starttime', '>', Carbon::now()->subHours(6))
|
|
||||||
->where(function ($query) use ($element_ids) {
|
->where(function ($query) use ($element_ids) {
|
||||||
$query->orWhereIn('home_id', $element_ids)->orWhereIn('away_id', $element_ids);
|
$query->orWhereIn('home_id', $element_ids)->orWhereIn('away_id', $element_ids);
|
||||||
});
|
});
|
||||||
@@ -37,8 +35,7 @@ class LoadEvents
|
|||||||
$query = Event::query()
|
$query = Event::query()
|
||||||
->with('home')
|
->with('home')
|
||||||
->with('away')
|
->with('away')
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
->where('sport_id', auth()->user()->sport_id);
|
||||||
->whereDate('starttime', '>', Carbon::now()->subHours(6));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Auth::user()->provider_id) {
|
switch (Auth::user()->provider_id) {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace App\Livewire\Mapper;
|
|||||||
|
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
use App\Models\Mapper;
|
use App\Models\Mapper;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
|
|
||||||
class LoadProvider
|
class LoadProvider
|
||||||
{
|
{
|
||||||
@@ -21,7 +20,6 @@ class LoadProvider
|
|||||||
if (is_array($search_values) and \count($search_values)) {
|
if (is_array($search_values) and \count($search_values)) {
|
||||||
|
|
||||||
return Mapper::query()
|
return Mapper::query()
|
||||||
// ->whereDate('starttime', '>', Carbon::now()->subHours(12))
|
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
->where('sport_id', auth()->user()->sport_id)
|
||||||
->where('provider_id', auth()->user()->provider_id)
|
->where('provider_id', auth()->user()->provider_id)
|
||||||
->where(function ($query) use ($search_values) {
|
->where(function ($query) use ($search_values) {
|
||||||
@@ -33,7 +31,6 @@ class LoadProvider
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
return Mapper::query()
|
return Mapper::query()
|
||||||
// ->whereDate('starttime', '>', Carbon::now()->subHours(12))
|
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
->where('sport_id', auth()->user()->sport_id)
|
||||||
->where('provider_id', auth()->user()->provider_id);
|
->where('provider_id', auth()->user()->provider_id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user