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

Hi,

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.

Firtzberg

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.