简体   繁体   English

Laravel预订系统设计

[英]Laravel booking system design

I want to create a booking system in Laravel where user chooses Date and one of the timeslots given.我想在 Laravel 中创建一个预订系统,其中用户选择日期和给定的时间段之一。 My idea right now is to store in database table (MySQL), the booking_date in one field and the booking_timeslot in another.我现在的想法是存储在数据库表(MySQL)中,booking_date 在一个字段中,booking_timeslot 在另一个字段中。 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实现目标的方法有很多,但一种有趣的方法是在一张带有空白订单 ID 的表格中生成所有带有日期和 24 小时的预订,并在订单到来时使用订单 ID 保留它们

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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