protected function runFaker($attribute)
    {
        if ($attribute instanceof Closure) {
            $attribute = $attribute();
        }

        // It's possible that the called Faker method returned an array.
        // If that is the case, we'll implode it for the user.

        if (is_array($attribute)) {

            // If we're dealing with an associative array...

            if (array_values($attribute) !== $attribute) {
                return array_map([$this, 'runFaker'], $attribute);
            }

            return implode(' ', $attribute);
        }

        return $attribute;
    }
protected function runFaker($attribute)
    {
        if ($attribute instanceof Closure) {
            $attribute = $attribute();
        }

        // It's possible that the called Faker method returned an array.
        // If that is the case, we'll implode it for the user.

        if (is_array($attribute)) {

            // If we're dealing with an associative array...

            if (array_values($attribute) !== $attribute) {
                return array_map([$this, 'runFaker'], $attribute);
            }

            return implode(' ', $attribute);
        }

        return $attribute;
    }
protected function runFaker ( $ attribute ) { if ( $ attribute instanceof Closure ) { $ attribute = $ attribute ( ) ; } // It's possible that the called Faker method returned an array. // If that is the case, we'll implode it for the user. if ( is_array ( $ attribute ) ) { // If we're dealing with an associative array... if ( array_values ( $ attribute ) !== $ attribute ) { return array_map ( [ $ this , 'runFaker' ] , $ attribute ) ; } return implode ( ' ' , $ attribute ) ; } return $ attribute ; }
Apply Faker dummy values.

@param  mixed $attribute
@return array|string
Apply Faker dummy values .