Add / Edit {{$title}}
@foreach($fields as $field => $props)
@if($props['type'] != 'hidden')
@endif
@switch($props['type'])
@case('hidden')
@break
@case('text')
@break
@case('number')
@break
@case('date')
@break
@case('textarea')
@if($field === 'html_format')
Use each metric id as a placeholder, for example {Ciphaler}.
@endif
@break
@case('select')
@php
$selected = ($mode == 'edit' && isset($item->{$field}) && $item->{$field} !== '') ? $item->{$field} : ($props['default'] ?? '');
@endphp
@break
@case('multiselect')
@break
@case('sheet_metrics')
Metric id is the HTML placeholder key.
@break
@endswitch
@if($props['type'] != 'hidden')
@endif
@endforeach