Last active
May 9, 2021 03:19
-
-
Save batbaatap/528e69caceb9b8c15dc4f5d654a01e63 to your computer and use it in GitHub Desktop.
Date, check id in table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$request->validate([ | |
'bookings' => 'required|array|min:1', | |
'bookings.*.hotelId' => 'required|exists:pm_hotel,id', // check id in pm_hotel | |
'bookings.*.from' => 'required|date', | |
'bookings.*.to' => 'required|date|after:bookings.*.from', | |
'bookings.*.night' => 'required|numeric|min:0|not_in:0', | |
'customer.first_name' => 'required|min:2', | |
]); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment