1
0
Fork 0

resources/views/components/form/inputs/select.blade.php: Set selected attribute.

This commit is contained in:
Henrik Hautakoski 2021-07-22 18:25:58 +02:00
parent acce1c21b8
commit 7ba4ab30c1

View file

@ -1,6 +1,6 @@
<select name="{{ $name }}" {!! $attributes->merge(['class' => 'w-full border rounded p-1 focus:ring-2']) !!}>
@forelse($options as $key => $option)
<option value="{{ $key }}">
<option value="{{ $key }}" @if($key == $value)selected @endif>
{{ $option }}
</option>
@empty