How can I try to using cache for all of Eloquent query.
Example:
$users = User::remember(10)->get(); $users->load('Info');
I want to cache data query from "load('Info')" too! But how can i do that ?
$users = User::with('info')->remember(10)->get();
or
$users = Cache::remember('users', 10, function() {
$users = User::get();
$users->load('info');
return $users;
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community