How to convert below query into Laravel equivalent query builder
SELECT * FROM `table_name` WHERE '03-05-2017 09:30' BETWEEN `start_date` AND `end_date` AND `who_should`='VV000'
I tried using whereBetween but not working as expected.
How to convert below query into Laravel equivalent query builder
SELECT * FROM `table_name` WHERE '03-05-2017 09:30' BETWEEN `start_date` AND `end_date` AND `who_should`='VV000'
I tried using whereBetween but not working as expected.
$given_time = "03-05-2017 09:30";
\DB::table('table_name')
->whereRaw(" '$given_time' Between start_date and end_date ")
->where("who_should", "=", "VV000")
->get();