From 12d456f36b9793e2563180a381d3c4c259b53232 Mon Sep 17 00:00:00 2001 From: carly Date: Thu, 15 Aug 2024 13:36:33 +0800 Subject: [PATCH] Update field type config attribute setup --- src/FieldTypes/Configs/Attributes/ConfigName.php | 9 ++++++++- src/FieldTypes/Configs/Attributes/FormComponent.php | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/FieldTypes/Configs/Attributes/ConfigName.php b/src/FieldTypes/Configs/Attributes/ConfigName.php index cf7b565..70957bf 100644 --- a/src/FieldTypes/Configs/Attributes/ConfigName.php +++ b/src/FieldTypes/Configs/Attributes/ConfigName.php @@ -2,7 +2,14 @@ namespace SolutionForest\FilamentFieldGroup\FieldTypes\Configs\Attributes; -#[\Attribute] +use Attribute; + +/** + * @property string $name The name of the field type configuration. + * @property string $label The label of the field type configuration. + * @property string $group The group of the field type configuration. + */ +#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)] class ConfigName { public function __construct( diff --git a/src/FieldTypes/Configs/Attributes/FormComponent.php b/src/FieldTypes/Configs/Attributes/FormComponent.php index 40927e3..0af4f81 100644 --- a/src/FieldTypes/Configs/Attributes/FormComponent.php +++ b/src/FieldTypes/Configs/Attributes/FormComponent.php @@ -2,7 +2,12 @@ namespace SolutionForest\FilamentFieldGroup\FieldTypes\Configs\Attributes; -#[\Attribute] +use Attribute; + +/** + * @property string $fqcn The fully qualified class name of the form component. + */ +#[Attribute(Attribute::TARGET_CLASS)] class FormComponent { public function __construct(