wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Events\Tables\Tools;
|
||||
|
||||
use App\Models\Event;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class LoadClientStartimeDifference
|
||||
{
|
||||
public static function load()
|
||||
{
|
||||
|
||||
$events = Event::with('event_bookmaker')
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->where('starttime', '>=', Carbon::now())
|
||||
->whereHas('event_bookmaker', function ($query) {
|
||||
$query->where('bookmaker_id', auth()->user()->bookmaker_id);
|
||||
})
|
||||
->get();
|
||||
|
||||
$event_ids = [];
|
||||
foreach ($events as $event) {
|
||||
if ($event->starttime != $event->event_bookmaker->starttime) {
|
||||
$event_ids[] = $event->id;
|
||||
}
|
||||
}
|
||||
|
||||
return array_unique($event_ids);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user