This commit is contained in:
salam committed 2026-10-04 15:25:03 +02:00
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);
}
}