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

View file

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