The basic gist of it is that you need to parameters in request. The from and to date. You can simply do this in a form for example or you can get them as query parameters to your url.
In your controller you have to get those values from the request and use them in your query. Laravel offers you a `whereBetween(field, array of values).
So you might end up with something like this in your controller
public function index(Request $request)
{
$users = User::whereBetween('created_at', [$request->get('from'), $request->get('to')])->get();
return redirect()->route('users.index', compact('users'));
}
Documentation: https://laravel.com/docs/5.7/queries#where-clauses