protected function resolveUIComponentParams($name, $file)
    {
        $namespace = $this->resolveUIComponentNamespace($this->files->get($file));
        if (!class_exists($namespace . '\\' . $name)) {
            return false;
        }
        $instance   = app($namespace . '\\' . $name);
        $hasWidgets = Registry::isRegistered('ui-components');
        if (!$hasWidgets) {
            $collection = new Collection([$instance]);
        } else {
            $collection = Registry::get('ui-components');
            $collection->push($instance);
        }

        $this->resolveDisabledUIComponent($instance);
        $this->resolveViewedUIComponent($instance);

        Registry::set('ui-components', $collection);
        $attributes = $instance->getAttributes();



        return array_except($attributes, ['id']);
    }