src/Utilities/Helper.php
public static function convertToArray($row)
    {
        $data = $row instanceof Arrayable ? $row->toArray() : (array) $row;

        foreach ($data as &$value) {
            if (is_object($value) || is_array($value)) {
                $value = self::convertToArray($value);
            }

            unset($value);
        }

        return $data;
    }
public static function convertToArray($row)
    {
        $data = $row instanceof Arrayable ? $row->toArray() : (array) $row;

        foreach ($data as &$value) {
            if (is_object($value) || is_array($value)) {
                $value = self::convertToArray($value);
            }

            unset($value);
        }

        return $data;
    }
public static function convertToArray ( $ row ) { $ data = $ row instanceof Arrayable ? $ row -> toArray ( ) : ( array ) $ row ; foreach ( $ data as & $ value ) { if ( is_object ( $ value ) || is_array ( $ value ) ) { $ value = self :: convertToArray ( $ value ) ; } unset ( $ value ) ; } return $ data ; }
Converts array object values to associative array.

@param mixed $row
@return array
Converts array object values to associative array .