Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Write down what result you expect and what's your tables, models setup

Last updated 2 years ago.
0

The setup is the composite pattern, only the leaves can appear in multiple trees. For this reason there is a pivot table describing the many to many relationship.

I'd like to be able to get the top of the composite hierarchy, via an essentially in order recursive descent.

Last updated 2 years ago.
0

Throw an example as composite pattern doesn't clear things up.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.