fixed view from sending all custom fields

This commit is contained in:
Godfrey M 2024-04-22 18:27:34 -07:00
parent df5cacf8a2
commit 96b3af7cbc
2 changed files with 4 additions and 4 deletions

View file

@ -790,10 +790,9 @@ class SettingsController extends Controller
*/
public function getLabels()
{
return view('settings.labels', [
'setting' => Setting::getSettings(),
'customFields' => CustomField::all(),
]);
return view('settings.labels')
->with('setting', Setting::getSettings())
->with('customFields', CustomField::where('field_encrypted', '=', 0)->get());
}
/**

View file

@ -348,6 +348,7 @@
</optgroup>
<optgroup label="Custom Fields">
@foreach($customFields as $customField)
<option value="{{ $customField->db_column }}">{{ $customField->name }}</option>
@endforeach
</optgroup>