fix: notif
This commit is contained in:
@@ -25,7 +25,7 @@ class SendDueReminders extends Command
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$now = now();
|
||||
$now = now();
|
||||
$currentTime = $now->toTimeString(); // HH:MM:SS
|
||||
|
||||
$this->info("Current time: {$now}");
|
||||
@@ -33,8 +33,8 @@ public function handle(): int
|
||||
|
||||
$reminders = Reminder::with(['user', 'packageName'])
|
||||
->where(function ($query) use ($now, $currentTime) {
|
||||
// Compare only the TIME portion
|
||||
$query->whereRaw('TIME(time) <= ?', [$currentTime])
|
||||
// For PostgreSQL: Cast datetime to time for comparison
|
||||
$query->whereRaw('time::time <= ?', [$currentTime])
|
||||
->where(function ($sub) use ($now) {
|
||||
// Non-repeatable: send once
|
||||
$sub->where('repeatable', false)
|
||||
|
||||
Reference in New Issue
Block a user