src/Collection.php
public function getFirstError()
    {
        foreach ($this->models as $model) {
            if ($model->hasErrors()) {
                $errors = $model->getFirstErrors();

                return array_shift($errors);
            }
        }

        return false;
    }
public function getFirstError()
    {
        foreach ($this->models as $model) {
            if ($model->hasErrors()) {
                $errors = $model->getFirstErrors();

                return array_shift($errors);
            }
        }

        return false;
    }
public function getFirstError ( ) { foreach ( $ this -> models as $ model ) { if ( $ model -> hasErrors ( ) ) { $ errors = $ model -> getFirstErrors ( ) ; return array_shift ( $ errors ) ; } } return false ; }
Returns the first error of the collection.
@return bool|mixed
Returns the first error of the collection .