Files
opensem/resources/views/components/options-complex.blade.php
Ludovic CANDELLIER 36267139a1 [WIP] Setup of skeleton
2020-03-25 00:08:27 +01:00

15 lines
393 B
PHP

@if (isset($list) && count($list))
@foreach($list as $item)
<option
@if (isset($value) && ($item['id'] == $value)) selected @endif value="{{$item['id']}}"
@foreach($item as $item_key => $item_value)
@if (($item_key != 'id') && ($item_key != 'txt'))
data-{{ $item_key }}="{{ $item_value }}"
@endif
@endforeach
>
{{ $item['txt'] }}
</option>
@endforeach
@endif