Level 16
No ideas guys?
Hi guys, I defined the booth() method in my AppServiceProvider in this way:
public function boot()
{
\View::composer('*', function ($view) {
$movies = \Cache::remember('movies', 1, function () {
return Movie::all();
});
$view->with('movies', $movies);
});
}
so that I have all the movies in each view however I have a problem, before I was passing to my movies.index view all the movies from the movie controller and then I was paginating them with the links() method, now that I'm using the AppServiceProvider I have an error for the links() and I can't paginate the movies. I tried to use the paginate() method in the AppServiceProvider but doesn't change anything. Any ideas? Thanks
No ideas guys?
Please or to participate in this conversation.