Example #1
0
 /**
  * Returns if there are errors or not.
  *
  * @param string $attribute
  *
  * @return bool
  */
 protected function hasErrors($attribute = 'errors')
 {
     return $this->resultModel->hasErrors($attribute);
 }
Example #2
0
 /**
  * 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')]);
     }
 }