newsService = $newsService; } /** * @return void * * @throws BindingResolutionException */ public function get() { if (! env('LEAN_NEWS_ENABLED', true)) { $this->tpl->assign('rss', 'News service is disabled'); return; } $news = false; try { $news = $this->newsService->getLatest(session('userdata.id')); } catch (\Exception $e) { Log::warning('Could not connect to news server'); } if ($news === false) { $news = 'Could not connect to news server'; } $this->tpl->assign('rss', $news); } }