public function parseFilter($filter, $model)
    {
        $this->guardProviderNames(null, $model);

        $applied = [
            'operation' => $filter['operation'],
        ];

        if (isset($filter['local'])) {
            $applied['property'] = $filter['local'];
        }

        if (isset($filter['remote'])) {
            $applied['value'] = $model->getProperty($filter['remote']);
        }

        if (isset($filter['remote_value'])) {
            $applied['value'] = $filter['remote_value'];
        }

        if (isset($filter['value'])) {
            $applied['value'] = $filter['value'];
        }

        if (isset($filter['children'])) {
            foreach ($filter['children'] as $child) {
                $applied['children'][] = $this->parseFilter($child, $model);
            }
        }

        return $applied;
    }