This commit is contained in:
salam committed 2026-06-14 11:13:16 +02:00
1 parent cb20a72fcb
commit ed182bcb4d
1 file changed
+9 -9
@@ -195,7 +195,7 @@ class EventsTable
->options(function () {
$res = Event::where('has_markets', 1)
->where('sport_id', auth()->user()->sport_id)
->whereDate('starttime', '>=', Carbon::now())
->where('starttime', '>=', Carbon::now())
->groupBy('country_id')
->pluck('country_id')->toArray();
@@ -219,7 +219,7 @@ class EventsTable
->with('country')
->with('competition_group')
->where('sport_id', auth()->user()->sport_id)
->whereDate('starttime', '>', Carbon::now())
->where('starttime', '>', Carbon::now())
->whereIn('country_id', $get('country_id'))
->groupBy('competition_group_id')->get();
} else {
@@ -227,8 +227,8 @@ class EventsTable
->with('country')
->with('competition_group')
->where('sport_id', auth()->user()->sport_id)
->whereDate('starttime', '>', Carbon::now())
->groupBy('competition_group_id')->get();
->where('starttime', '>', Carbon::now())
->groupBy('competition_group.id')->get();
}
$arr = [];
@@ -253,7 +253,7 @@ class EventsTable
$res = Event::where('has_markets', 1)
->with('competition_group')
->where('sport_id', auth()->user()->sport_id)
->whereDate('starttime', '>', Carbon::now())
->where('starttime', '>', Carbon::now())
->groupBy('competition_group_id')
->get();
$arr = [];
@@ -330,18 +330,18 @@ class EventsTable
$end = Carbon::createFromDate($starttime_period['end']);
return $query
->whereDate('starttime', '>=', $from)
->whereDate('starttime', '<=', $end);
->where('starttime', '>=', $from)
->where('starttime', '<=', $end);
} elseif (isset($starttime_period['start'])) {
$from = Carbon::createFromDate($starttime_period['start']);
return $query
->whereDate('starttime', '>=', $from);
->where('starttime', '>=', $from);
} elseif (isset($starttime_period['end'])) {
$end = Carbon::createFromDate($starttime_period['end']);
return $query
->whereDate('starttime', '<=', $end);
->where('starttime', '<=', $end);
}
}
)->when(