public function handle() { if ($this->exception instanceof AuthException) { Error::log($this->exception); } elseif ($this->exception instanceof NotCallableException) { Error::log($this->exception); } elseif ($this->exception instanceof PDOException) { Error::log($this->exception); } elseif ($this->exception instanceof MethodNotAllowedException) { Error::log($this->exception); } }
protected function setModel($model) { $modelName = ucfirst($model); $model = implode('\\', ['App', 'Models']) . '\\' . $modelName; if (class_exists($model)) { return new $model(); } else { $exception = new Exception(); Error::log($exception); throw new $exception(); } }