public static function export($data)
    {
        if (is_object($data)) {
            //	Allow embedded export method for specific export
            if ($data instanceof Arrayable || method_exists($data, 'toArray')) {
                $data = $data->toArray();
            } else {
                $data = get_object_vars($data);
            }
        }

        if (!is_array($data)) {
            return $data;
        }

        $output = [];

        foreach ($data as $key => $value) {
            $output[$key] = static::export($value);
        }

        return $output;
    }