select whereDate to where

This commit is contained in:
salam committed 2026-02-25 17:14:56 +01:00
1 parent 79271f22e1
commit d58d543583
15 files changed
+61 -61

No files matched your search

+6 -6
View File
@@ -45,7 +45,7 @@ class Odds
/**
* Delete
*/
$info = Event::whereDate('starttime', '<', Carbon::now()->subMinutes(10))->delete();
$info = Event::where('starttime', '<', Carbon::now()->subMinutes(10))->delete();
if ($debug) {
Notice::note("Deleted: $info");
@@ -126,7 +126,7 @@ class Odds
$from_to = '&days='.Nuh::$options['days_from'].','.Nuh::$options['days_to'];
$events = Event::whereDate('starttime', '>', Carbon::now())->where('group_id', Nuh::$options['gid'])->pluck('id');
$events = Event::where('starttime', '>', Carbon::now())->where('group_id', Nuh::$options['gid'])->pluck('id');
foreach ($events as $event_id) {
$_calls[] = $url.$markets.$from_to.'&peid='.$event_id;
@@ -142,7 +142,7 @@ class Odds
$from_to = '&days='.Nuh::$options['days_from'].','.Nuh::$options['days_to'];
$groupids = Event::whereDate('starttime', '>', Carbon::now())->groupBy('group_id')->pluck('group_id');
$groupids = Event::where('starttime', '>', Carbon::now())->groupBy('group_id')->pluck('group_id');
foreach ($groupids as $groupid) {
$_calls[] = $url.$markets.$from_to.'&pgid='.$groupid;
@@ -158,7 +158,7 @@ class Odds
Notice::note("TODAY \nsport_id: ".Nuh::$options['sport_id'], 'p');
}
$res = Event::where('sport_id', Nuh::$options['sport_id'])->whereDate('starttime', '>=', Carbon::now())->whereDate('starttime', '<', Carbon::now()->addDays(1))->pluck('id');
$res = Event::where('sport_id', Nuh::$options['sport_id'])->where('starttime', '>=', Carbon::now())->where('starttime', '<', Carbon::now()->addDays(1))->pluck('id');
foreach ($res as $id) {
$_calls[] = $url.$sport.$markets.'&peid='.$id;
@@ -174,7 +174,7 @@ class Odds
Notice::note("ONE WEEK FROM NOW \nsport_id: ".Nuh::$options['sport_id'], 'p');
}
$res = Event::where('sport_id', Nuh::$options['sport_id'])->whereDate('starttime', '>', Carbon::now())->whereDate('starttime', '<', Carbon::now()->addDays(7))->pluck('id');
$res = Event::where('sport_id', Nuh::$options['sport_id'])->where('starttime', '>=', Carbon::now())->where('starttime', '<', Carbon::now()->addDays(7))->pluck('id');
foreach ($res as $id) {
$_calls[] = $url.$sport.$markets.'&peid='.$id;
@@ -190,7 +190,7 @@ class Odds
Notice::note("ALL \nsport_id: ".Nuh::$options['sport_id'], 'p');
}
$res = Event::where('sport_id', Nuh::$options['sport_id'])->whereDate('starttime', '>', Carbon::now())->pluck('id');
$res = Event::where('sport_id', Nuh::$options['sport_id'])->where('starttime', '>=', Carbon::now())->pluck('id');
foreach ($res as $id) {
$_calls[] = $url.$sport.$markets.'&peid='.$id;