From bd58b4f05484b4d6ec67c3c7dab1624fdcb92a5b Mon Sep 17 00:00:00 2001 From: adeiskandarzulkarnaen Date: Thu, 8 Aug 2024 06:20:55 +0700 Subject: [PATCH] update payment controller --- app/Http/Controllers/PaymentController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index cec683f..e3e346e 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -76,7 +76,8 @@ public function validate(Request $request): RedirectResponse | string }) ->get(); - if (!empty($conflictingReservations)) { + //Log::info(json_encode($conflictingReservations, JSON_PRETTY_PRINT)); + if (!$conflictingReservations->isEmpty()) { $message = 'Waktu reservasi sudah ada yg pesan '.$conflictingReservations[0]["time"].', lakukan reservasi 30 menit sebelum/sesudahnya.'; return back()->withErrors(['time' => $message])->withInput();