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