أُنشئ من Tokal/Test
Fix API reliability and CORS config for hosted deployment
هذا الالتزام موجود في:
@@ -26,7 +26,7 @@ class SendReservationReminders extends Command
|
||||
$reservations = Reservation::query()
|
||||
->where('status', 'approved')
|
||||
->whereRaw(
|
||||
"STR_TO_DATE(CONCAT(reservation_date,' ',reservation_time), '%Y-%m-%d %H:%i:%s') BETWEEN ? AND ?",
|
||||
"(reservation_date::text || ' ' || reservation_time::text)::timestamp BETWEEN ? AND ?",
|
||||
[$now->format('Y-m-d H:i:s'), $windowEnd->format('Y-m-d H:i:s')]
|
||||
)
|
||||
->get();
|
||||
@@ -42,13 +42,14 @@ class SendReservationReminders extends Command
|
||||
|
||||
ReservationReminder::create([
|
||||
'reservation_id' => $reservation->id,
|
||||
'user_id' => $reservation->customer_id,
|
||||
'send_at' => $sendAt,
|
||||
'sent_at' => now(),
|
||||
]);
|
||||
|
||||
Notification::create([
|
||||
'user_id' => $reservation->customer_id,
|
||||
'type' => 'reservation_reminder',
|
||||
'type' => 'reminder',
|
||||
'title' => 'Reservation reminder',
|
||||
'body' => 'Your reservation is coming up in about ' . $minutes . ' minutes.',
|
||||
'data_json' => [
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم