feat(form-builder): form_field_configs relational table + non-validation key split + drop validation_rules JSON columns
This commit is contained in:
@@ -35,7 +35,6 @@ final class FormFieldLibrary extends Model
|
||||
'label',
|
||||
'help_text',
|
||||
'options',
|
||||
'validation_rules',
|
||||
'default_is_required',
|
||||
'default_is_filterable',
|
||||
'translations',
|
||||
@@ -46,7 +45,6 @@ final class FormFieldLibrary extends Model
|
||||
/** @var array<string, string> */
|
||||
protected $casts = [
|
||||
'options' => 'array',
|
||||
'validation_rules' => 'array',
|
||||
'translations' => 'array',
|
||||
'default_is_required' => 'bool',
|
||||
'default_is_filterable' => 'bool',
|
||||
@@ -74,4 +72,9 @@ final class FormFieldLibrary extends Model
|
||||
{
|
||||
return $this->morphMany(FormFieldValidationRule::class, 'owner');
|
||||
}
|
||||
|
||||
public function configs(): MorphMany
|
||||
{
|
||||
return $this->morphMany(FormFieldConfig::class, 'owner');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user