Skip to content

Conversation

robbytaylor
Copy link

Laravel allows models to define a custom collection class. However, at the moment the Collection class name is hard-coded breaking this functionality.

This PR calls the related model's newCollection method to return a collection.

See https://laravel.com/docs/5.5/eloquent-collections#custom-collections

@jenssegers jenssegers merged commit cf15156 into mongodb:master Nov 3, 2017
@robbytaylor
Copy link
Author

Thanks 👍

mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
Fix Unable to set a custom collection for models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants