/** * Bootstrap any application services. * * @return void */ public function boot() { $recentPosts = $this->getLatestBlogs(3); $tags = Tag::has('posts')->get(); view()->share('recentPosts', $recentPosts); view()->share('tags', $tags); }