Skip to content

Fix Unable to set a custom collection for models #1343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2017
Merged

Fix Unable to set a custom collection for models #1343

merged 1 commit into from
Nov 3, 2017

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