Exemplo n.º 1
0
 public function __construct(SyncNewsService $syncNewsService, Builder $viewBuilder, Filesystem $filesystem)
 {
     $this->syncNewsService = $syncNewsService;
     $this->viewBuilder = $viewBuilder;
     $this->viewBuilder->setDataRepository($this);
     $this->filesystem = $filesystem;
 }
Exemplo n.º 2
0
 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'));
     }
 }