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!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.