F
Filament15mo ago
Homd

Show Parent Relationship.

Hi guys, I need a little help figuring this out. The title might be a bit misleading, I just cannot word it better. I have 3 Model Model Level -> hasmany Model Project Model Level -> hasmany Model Classroom Now in the classroom edit page, I want to show all the project that the classroom inherit from its level. How should I approach this? Thanks!
Solution:
For anyone searching something similar: This plugin is awsome holy shit: https://github.com/staudenmeir/eloquent-has-many-deep ...
GitHub
GitHub - staudenmeir/eloquent-has-many-deep: Laravel Eloquent HasMa...
Laravel Eloquent HasManyThrough relationships with unlimited levels - GitHub - staudenmeir/eloquent-has-many-deep: Laravel Eloquent HasManyThrough relationships with unlimited levels
Jump to solution
2 Replies
Homd
HomdOP15mo ago
I just found out laravel have, "hasManyThrough" Is this the correct approach? My idea is to define the relationship in classroom model and then creating relationship manager
Solution
Homd
Homd15mo ago
For anyone searching something similar: This plugin is awsome holy shit: https://github.com/staudenmeir/eloquent-has-many-deep It handles every complex relationship
GitHub
GitHub - staudenmeir/eloquent-has-many-deep: Laravel Eloquent HasMa...
Laravel Eloquent HasManyThrough relationships with unlimited levels - GitHub - staudenmeir/eloquent-has-many-deep: Laravel Eloquent HasManyThrough relationships with unlimited levels
Want results from more Discord servers?
Add your server