jeevamugunthan
4 months ago
935
17
Laravel

how to get data from database where current date is in between from and to date

Posted 4 months ago by jeevamugunthan

my code is

$current_date=date('Y-m-d');

            $maintenance=Maintenance::get()->where('admin_id', '=', $admin_id)->whereBetween($current_date, ['due_from', 'due_to'])->toArray();

but i get an empty array value

any body know how to fetch this

Please sign in or create an account to participate in this conversation.