Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to retrieve data from database using select option in laravel

<select class="form-control" name="product_id">
    <option>Select Product</option>
    @foreach ($products as $key => $value)
        <option value="{{ $key }}" {{ ( $key == $selectedID) ? 'selected' : '' }}> 
            {{ $value }} 
        </option>
    @endforeach    
</select>
Source by www.pakainfo.com #
 
PREVIOUS NEXT
Tagged: #retrieve #data #database #select #option #laravel
ADD COMMENT
Topic
Name
3+9 =