[6.x] Add an `eager()` method to the lazy collection class by JosephSilber · Pull Request #29832 · laravel/framework
The eager() method enumerates all of the lazy collection's values, and constructs a new LazyCollection instance, which will now be backed by an array: $users = User::cursor(); $users = $users-...