예제 #1
0
 /**
  * @return \Illuminate\Contracts\View\View
  */
 public function index()
 {
     $this->prerequisite->check();
     $errors = $this->prerequisite->getErrors();
     if (count($errors)) {
         $this->share('errors', $errors);
         return $this->view('install::errors');
     } else {
         return $this->view('install::install');
     }
 }
 /**
  * @param \Psr\Http\Message\ServerRequestInterface $request
  * @param \Notadd\Install\Contracts\Prerequisite $prerequisite
  * @return \Illuminate\Contracts\View\View
  */
 public function render(ServerRequestInterface $request, Prerequisite $prerequisite)
 {
     $view = $this->view->make('install::layout');
     $prerequisite->check();
     $errors = $prerequisite->getErrors();
     if (count($errors)) {
         $view->content = $this->view->make('install::errors');
         $view->content->errors = $errors;
     } else {
         $view->content = $this->view->make('install::install');
     }
     return $view;
 }