To me that sounds like an overkill. Those times do not change that often, right?
Opening Hours & Time Availability
I have a laravel project and I'm wondering about the best way to implement opening hours and availability in Listing table.
Step to produce:
A listing model has these columns:
- title
- city
- address
- availability time
- opening hours
I think about making a opening_hours table and make relation between the opening_hours table and listing like so:
Opening Hours table has
-
day
-
opening time
-
closing time
-
listing_id
-
Listing has many opening hours.
-
Opening Hours belongs to listing.
Any Ideas about how to implement those two [Opening hours & time availability] I'll be appreciated.
Thanks in advance.
If you don't need to interact with the data (for example, changing some view based on the current time and store open/store closed) then I would probably hold it as a serialized array or as json in a single field.
Please or to participate in this conversation.