and a booking_types table which has two rows i.e. overnight and hourly .
every hotel have overnight by default and if vendor select hourly then it will be overnight + hourly.
But the problem is when i am adding it to the migration via foreign id like that
$table->integer('booking_type_id')->foreign('booking_type_id')->references('id')->on('booking_types')->default(1);
The only option for me is to add one id at a time
i.e. 1 or 2
if i consider 2 as both 1 and 2 option it will decrease readibility?
is this ok?
Try boolean true or false Like is_hourly
But the thing i am trying to do will not work with this approach. I. E. Admin can set hourly and overnight active or disabled and it also include analytics. I think I need to make a relationship table between hotel and hotel_booking_type_relations table
Обсуждают сегодня