简体   繁体   中英

Laravel booking system design

I want to create a booking system in Laravel where user chooses Date and one of the timeslots given. My idea right now is to store in database table (MySQL), the booking_date in one field and the booking_timeslot in another. The problem with this design is that I do not know how to prevent another user from choosing the same date and timeslot, or how to render the timeslot chosen on a particular day non-usable again.

Please I would really appreciate any advice. Thank you in advance.

Many ways to achieve your goal but one interesting way is generating all booking with dates and 24 hours in one table with blank order id and when order come reserve them with order id

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM