/** * Returns if there are errors or not. * * @param string $attribute * * @return bool */ protected function hasErrors($attribute = 'errors') { return $this->resultModel->hasErrors($attribute); }
/** * Consumes the errors listed in an existing result and appends them to this result. * * @param Result $result The result to consume */ public function consume(Result $result) { if ($result->hasErrors('errors')) { $this->addErrors(['errors' => $result->getErrors('errors')]); } }