src/Arrayer.php
protected function arrayDot($array, $prepend = null)
    {
        if (function_exists('array_dot')) {
            return array_dot($array);
        }

        $results = [];

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $results = array_merge($results, $this->arrayDot($value, $prepend.$key.'.'));
            } else {
                $results[$prepend.$key] = $value;
            }
        }

        return $results;
    }
protected function arrayDot($array, $prepend = null)
    {
        if (function_exists('array_dot')) {
            return array_dot($array);
        }

        $results = [];

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $results = array_merge($results, $this->arrayDot($value, $prepend.$key.'.'));
            } else {
                $results[$prepend.$key] = $value;
            }
        }

        return $results;
    }
protected function arrayDot ( $ array , $ prepend = null ) { if ( function_exists ( 'array_dot' ) ) { return array_dot ( $ array ) ; } $ results = [ ] ; foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ results = array_merge ( $ results , $ this -> arrayDot ( $ value , $ prepend . $ key . '.' ) ) ; } else { $ results [ $ prepend . $ key ] = $ value ; } } return $ results ; }
Flatten a multi-dimensional associative array with dots.
From Laravel framework.

@param  array   $array
@param  string  $prepend
@return array
Flatten a multi - dimensional associative array with dots . From Laravel framework .