I'm receiving the following error in Laravel 5.2
The following is the query :
$ansrow = DB::table('answers')
->where('user_id', $u_id)
->whereBetween('created_at', [
now()->format('Y-m-d H:00:00'),
now()->addHours(1)->format('Y-m-d H:00:00')
])
->first();
I receive the following error :
Call to undefined function App\Http\Controllers\now()