public function __construct(SyncNewsService $syncNewsService, Builder $viewBuilder, Filesystem $filesystem) { $this->syncNewsService = $syncNewsService; $this->viewBuilder = $viewBuilder; $this->viewBuilder->setDataRepository($this); $this->filesystem = $filesystem; }
private function handleException($e) { if ($e instanceof AlreadySubscribed) { $view = $this->viewBuilder->buildViewData(view('2016.messages.already-subscribed')); return Response::make($view); } if ($e instanceof NotFoundHttpException) { return Response::make(view('errors.404')); } }