Mercurial > packages > framework
comparison publishable/resources/views/components/form/select.blade.php @ 2:b44434aaa767
Moving around the components.
Made a big step in the right direction with the Builder and named joins being accessible.
| author | luka |
|---|---|
| date | Wed, 18 Jun 2025 22:28:47 -0400 |
| parents | resources/views/components/form/select.blade.php@56d9c64d64aa |
| children | 84c75d9d90be |
comparison
equal
deleted
inserted
replaced
| 1:56d9c64d64aa | 2:b44434aaa767 |
|---|---|
| 1 @props(['name', 'label', 'options' => [], 'value' => '', 'required' => false]) | |
| 2 <div class="mb-4"> | |
| 3 <label for="{{ $name }}" class="block text-gray-700">{{ $label }}</label> | |
| 4 <select name="{{ $name }}" id="{{ $name }}" @if ($required) required @endif | |
| 5 class="mt-1 block w-full rounded border-gray-300 shadow-sm focus:ring focus:ring-blue-200"> | |
| 6 <option value="">Select...</option> | |
| 7 @foreach ($options as $optionValue => $optionLabel) | |
| 8 <option value="{{ $optionValue }}" {{ old($name, $value) == $optionValue ? 'selected' : '' }}> | |
| 9 {{ $optionLabel }} | |
| 10 </option> | |
| 11 @endforeach | |
| 12 </select> | |
| 13 @error($name) | |
| 14 <span class="text-red-600 text-sm">{{ $message }}</span> | |
| 15 @enderror | |
| 16 </div> |
