Support the ongoing development of →
Eloquent Architecture
Last updated 1 year ago.


I might not fully understand your question, but will try to point into a direction you might not have considered. You can use PHP magic to define magic functions which resolve to relationships. I am not sure if you can use this in combination with eager loading. Also be careful not to brake the PHP magic which Laravel uses.



Sign in to participate in this thread!

Full Stack Europe

Your banner here too?


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

Your logo here?

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

© 2023 - All rights reserved.