public function errors($errors)
    {
        $this->success = false;
        $this->data['errors'] = $errors instanceof MessageBag
            ? $errors->toArray()
            : $errors;

        return $this;
    }
public function errors($errors)
    {
        $this->success = false;
        $this->data['errors'] = $errors instanceof MessageBag
            ? $errors->toArray()
            : $errors;

        return $this;
    }
public function errors ( $ errors ) { $ this -> success = false ; $ this -> data [ 'errors' ] = $ errors instanceof MessageBag ? $ errors -> toArray ( ) : $ errors ; return $ this ; }
Set response errors

@param mixed $errors

@return self
Set response errors