Improve property name

This commit is contained in:
Marcus Moore 2024-08-13 17:30:53 -07:00
parent f6c1642bf2
commit 038e86954b
No known key found for this signature in database
2 changed files with 3 additions and 4 deletions

View file

@ -13,7 +13,6 @@ class CustomFieldSetDefaultValuesForModel extends Component
public $add_default_values;
public $fieldset_id;
public $fields;
public $model_id;
public function mount($model_id = null)
@ -30,7 +29,7 @@ class CustomFieldSetDefaultValuesForModel extends Component
}
#[Computed]
public function customFields()
public function fields()
{
return CustomFieldset::find($this->fieldset_id)?->fields;
}

View file

@ -17,9 +17,9 @@
</div>
@if ($add_default_values ) {{-- 'if the checkbox is enabled *AND* there are more than 0 fields in the fieldsset' --}}
@if ($this->customFields)
@if ($this->fields)
@foreach ($this->customFields as $field)
@foreach ($this->fields as $field)
<div class="form-group">
<label class="col-md-3 control-label{{ $errors->has($field->name) ? ' has-error' : '' }}">{{ $field->name }}</label>