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

Three levels possible? #31

Closed
BasvanH opened this issue May 9, 2019 · 3 comments
Closed

Three levels possible? #31

BasvanH opened this issue May 9, 2019 · 3 comments

Comments

@BasvanH
Copy link

BasvanH commented May 9, 2019

Hello,

I'm a bit new to Eloquent and I'm still learning how to use it. Would the following be possible with your extension?

https://laracasts.com/discuss/channels/eloquent/multiple-layers?page=1#reply=509652

Much appreciated, regards,
Bastiaan

@BasvanH
Copy link
Author

BasvanH commented May 9, 2019

I think it comes down to:
Customer -> hasMany -> Products -> hasOne -> Product

@staudenmeir
Copy link
Owner

You can use my package, but you don't have to.

The answer on Laracasts is correct: Laravel's native BelongsToMany relationship is meant for cases like this.

@BasvanH
Copy link
Author

BasvanH commented May 10, 2019

Ok, have deep-dived into belongsToMany, but can't see this working for me in my particular use case. This is offcourse off topic from your beautiful package, but would you mind taking another look at the Laracasts topic? Have updated my post there. Much appreciated!

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