protected static function getWidgetAttribute($name)
    {
        if (!empty(self::$staticAttributes)) {
            return array_get(self::$staticAttributes, $name);
        }
        $classname = get_called_class();
        if (app('request')->ajax()) {
            self::setAjaxAttributes($classname);
        } else {
            $components = Registry::get('ui-components', []);

            foreach ($components as $component) {
                if ($classname !== get_class($component)) {
                    continue;
                }
                self::$staticAttributes = $component->getAttributes();
            }
        }
        return array_get(self::$staticAttributes, $name);
    }