protected function prepareData($data)
    {
        $callback = function ($value) {
            return $value !== null && $value !== [] && $value !== '';
        };

        foreach ($data as &$value) {
            if (is_array($value)) {
                $value = $this->prepareData($value);
            }
        }
        return array_filter($data, $callback);
    }