Either ditch the view composer and move that logic into a controller, or you can do something like this:
View::composer(array('home.layout', 'home.partials.sidebar'), function($view)
{
return $view->with('pages', Page::remember(1)->get());
});
which will cache the result for a minute.
What will it use to cache it? KV storages?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community