/** * Bootstrap the application services. * * @return void */ public function boot() { view()->composer('templates/public/_navigation', function ($view) { $view->with('links', MainMenu::where('active', true)->orderBy('position')->get()); }); view()->composer('templates/public/_tags', function ($view) { $view->with('tags', Tag::TagsWithPosts()); }); view()->composer('templates/public/_ads', function ($view) { $view->with('sponsors', Sponsor::get(['position', 'content', 'active'])); }); }