Home Rent available cars from rentals table
Reply: 0

Rent available cars from rentals table

user3787
1#
user3787 Published in September 20, 2018, 4:55 pm

I have my table with rentals

id| user_id| car_id | starting_date | ending_date

and here is cars table

id | name

I don't know how to habndle the situation.. I have N cars, and I want to return only available cars for specific dates.

For example I want to rent a car on this period: 20.02.2018 - 23.02.2018

But I don't know how to check every case to see if a car is available in that period using Laravel.

share|improve this question

1 Answer 1

active oldest votes
up vote 0 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.290414 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO