Skip to content

Conversation

@browner12
Copy link
Contributor

due to the new "automatic eager loading" feature, and the changes made here:

laravel/framework@5548f95

the programmer needs to also include these changes when using the newCollection() method override for a custom collection, if they want the automatic eager loading feature to work correctly.

as much as I hate to say it, it might be time to remove the documentation for the newCollection() method override option, and instead just document the Attribute option.

due to the new "automatic eager loading" feature, and the changes made here: laravel/framework@5548f95 the programmer needs to also include these changes when using the `newCollection()` method override for a custom collection, if they want the automatic eager loading feature to work correctly.
@taylorotwell taylorotwell merged commit d34d857 into laravel:12.x Aug 17, 2025
@AhmedAlaa4611
Copy link
Contributor

Do we need to perform this check every time we create a custom collection using the newCollection method? I think this check should be handled at the core level instead.

@browner12 browner12 deleted the AB-custom-collections-with-automatic-lazy-loading branch August 18, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants