select.blade.php 660 B

12345678910111213
  1. <div class="row mb-{{ ($mb ?? 3) }}">
  2. <label for="{{ $name }}" class="col-form-label @if(!($right ?? null)) col-md-4 text-md-end @endif mt-1">{{ $title }}</label>
  3. <div class="@if(!($right ?? null)) col-md-8 @endif">
  4. <select name="{{ $name }}" id="{{ $name }}" class="form-select @error($name) is-invalid @enderror" >
  5. @foreach($options as $k => $v)
  6. <option @selected($k == ($value ?? null)) value="{{ $k }}">{{ $v }}</option>
  7. @endforeach
  8. </select>
  9. @error($name)
  10. <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
  11. @enderror
  12. </div>
  13. </div>