@php // "stripe.secret_key" becomes the form name "stripe[secret_key]". $inputName = str($name)->replaceFirst('.', '[')->append(str_contains($name, '.') ? ']' : '')->toString(); $inputId = 'setting-'.$section.'-'.str_replace('.', '-', $name); $value = data_get($settings[$section], $name); $type ??= 'text'; $options ??= []; $hasError = $errors->has($name); @endphp @if ($type === 'checkbox')
@else
@if ($type === 'select') @elseif ($type === 'textarea') @elseif ($type === 'list') $hasError])> @elseif ($type === 'secret') {{-- Only the mask ever reaches the page; saving it unchanged keeps the stored secret. --}} $hasError])> @else {{-- For a plain input the options are its browser limits, such as min, max or pattern. --}} $limit) {{ $attribute }}="{{ $limit }}" @endforeach @class(['form-control', 'is-invalid' => $hasError])> @endif @error($name)
{{ $message }}
@enderror
@endif