This commit is contained in:
salam committed 2026-01-26 12:17:24 +01:00
1 parent 49b1eba348
commit 9ca5657827
28 files changed
+288 -234

No files matched your search

@@ -58,33 +58,20 @@ class EventResource extends Resource
->with('home')
->with('away')
->with('event_user_star')
->with('event_bookmaker')
->where('starttime', '>=', now());
if (auth()->user()->stars) {
$query->whereHas('event_user_star');
}
if (auth()->user()->all_only_none) {
switch (auth()->user()->bookmaker_id) {
case 10:
$field = 'magnig_id';
break;
case 16:
$field = 'magken_id';
break;
case 35:
$field = 'lognig_id';
break;
case 36:
$field = 'logcol_id';
break;
}
if (auth()->user()->all_only_none > 0) {
switch (auth()->user()->all_only_none) {
case 1:
$query->where($field, 1);
$query->whereHas('event_bookmaker');
break;
case 2:
$query->where($field, 0);
$query->doesntHave('event_bookmaker');
break;
}
}