Skip to content
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

Doesn't work with lazy load #5

Open
jeshtan opened this issue Jan 16, 2018 · 1 comment
Open

Doesn't work with lazy load #5

jeshtan opened this issue Jan 16, 2018 · 1 comment

Comments

@jeshtan
Copy link

jeshtan commented Jan 16, 2018

As subject, BelongsToOne relation does return desired object instead of collection if we eager load, however it doesn't work with lazy loading. Any idea?

$record = Record->first(); dump($record->group); // return model collection instead of Group object

@ankurk91
Copy link

ankurk91 commented Jan 5, 2019

you may want to use this package

https://github.com/ankurk91/laravel-eloquent-relationships

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

No branches or pull requests

2 participants