Mercurial > packages > framework
view publishable/resources/views/components/form/select.blade.php @ 4:84c75d9d90be
Changing usage to be bootstrap 5, not everything is reviewed but it's been started
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 20:33:35 -0400 |
| parents | b44434aaa767 |
| children |
line wrap: on
line source
@props(['name', 'label', 'options' => [], 'value' => '', 'required' => false]) <div class="mb-3"> <label for="{{ $name }}" class="form-label">{{ $label }}</label> <select name="{{ $name }}" id="{{ $name }}" @if ($required) required @endif class="form-select"> <option value="">Select...</option> @foreach ($options as $optionValue => $optionLabel) <option value="{{ $optionValue }}" {{ old($name, $value) == $optionValue ? 'selected' : '' }}> {{ $optionLabel }} </option> @endforeach </select> @error($name) <div class="text-danger small">{{ $message }}</div> @enderror </div>
