Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel blade @selected

<select name="version">
    @foreach ($product->versions as $version)
        <option value="{{ $version }}" @selected(old('version') == $version)>
            {{ $version }}
        </option>
    @endforeach
</select>
 
PREVIOUS NEXT
Tagged: #laravel #blade
ADD COMMENT
Topic
Name
1+3 =