Reputation: 115
I'm targeting a filter for an in-between date range. I do already have the basic filter
->where('from', '>=', $from)->where('to', '<=', $to)
example:
Date range to get: 01/01/2019 - 15/01/2019
Date range to use: 02/01/2019 - 03/01/2019
I should get the date range 01/01/2019 since it the range I use is in-between
Upvotes: 0
Views: 52
Reputation: 115
Flipped the condition and it somehow work:
->where('from', '<=', $from)
->where('to', '>=', $to)
Upvotes: 1