Support the ongoing development of Laravel.io →
Cache Eloquent

Is it possible to cache relationships with the remember function?

 $screen->Texts()->with('TextI18Ns')->rememberForever()->get();

Because now only the query for selecting the Texts is cached. The Query for the TextI18Ns is always executed.

Thanks. Kevin

Last updated 2 years ago.
0

No, "too scary to impliment in core" https://github.com/laravel/framework/pull/1418

Last updated 2 years ago.
0

Ok, thanks!

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

KevinM86 kevinm86 Joined 3 Feb 2014

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.

© 2025 Laravel.io - All rights reserved.