Data Query Time Range Query for Eloquent Time Range in Laravel

  ios, question


There is a field of created_at creation time in laravel User user;

Now I want to check the user registration for querying a certain time interval with this field created_at;

How do I find out

For example, query 2015-07-08 00:00:00
By 2015-07-29 11:32:48
Registered users

Now it has been submitted by the front desk.

"startTime" => "2015-07-08 00:00:00"
 "endTime" => "2015-07-29 11:32:48"
PhpUser::whereBetween('created_at', [Input::get('startTime'), Input::get('endTime')])->get();