Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

show selected value in dropdown laravel

<select class="js-states browser-default select2" name="shopping_id" required id="shopping_id">
        <option value="option_select" disabled selected>Shoppings</option>
        @foreach($shoppings as $shopping)
            <option value="{{ $shopping->id }}" {{$company->shopping_id == $shopping->id  ? 'selected' : ''}}>{{ $shopping->fantasyname}}</option>
        @endforeach
    </select>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #selected #dropdown #laravel
ADD COMMENT
Topic
Name
2+1 =