html – Different prices for different day amounts on booking app-ThrowExceptions

Exception or error:

I have a site where you can book properties. The user should be able to enter different prices for different amounts of days. e.g. 1 day is 100€, but 2-4 days is 90€, but 5+ days is 80€.

Currently the app supports just one price. There is a Post model (the property) which has a
price attribute.

I was thinking to maybe use a hash or array with the days and price amounts, but I am not sure how to implement it on the backend nor frontend.

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *