Pages

02 May, 2024

Is there a way to get a model's many to many relationship by reference?

I'm constantly exhausting my PHP's memory limit. I believe it's due to loading too many models into memory. My current setup is works something like this: I have 75 models that have many other related models (~243) that belong to many other related models (~6) with pivot data.

Once we get down to it, I'm looking at 120k+ models loaded into memory. That last set of models being a majority of those but I know there are tons upon tons of duplicates in there.

Is there anyway to call these relationships by reference with eloquent? submitted by /u/pitcherc
[link] [comments]

No comments:

Post a Comment

Thanks