I want to convert this query into laravel eloquent,
select * from schedule where (now() between start_date and end_date);
I tried using whereBetween, but I got some error.
$schedule = Schedule::whereBetween(Carbon::now(), ['start_date', 'end_date'])->get();
the error looks like this
QueryException in Connection.php line 647: SQLSTATE[42S22]: Column not found: 1054 Unknown column '2017-06-01 06:17:30' in 'where clause' (SQL: select * from
schedule
where2017-06-01 06:17:30
between start_date and end_date)
any idea?