vendredi 1 février 2019

Select Multiple dropdwon list from database in Laravel

in my web application i have added multiple data to database from json_encode using multiple select options.

in my database column its shown as below.

["Agriculture & Food Processing","Automobiles","Banking & Financial Services"]

Now i want to retrieve these data to edit and update. my view is like attached image

view

and my code is like below

<div class="form-group">
<label for="industry">Intrsting Industry</label>
<select id="industry" name="industry[]" class="form-control" multiple>
    <option value="">Select Option  </option>
    <option>Agriculture &amp; Food Processing</option>
    <option>Automobiles</option>
    <option>Banking &amp; Financial Services</option>
    <option>BPO / KPO </option>
    <option>Civil &amp; Construction</option>
    <option>Consumer Goods &amp; Durables</option>
    <option>Consulting</option>
    <option>Education</option>
    <option>Engineering</option>
    <option>Ecommerce &amp; Internet</option>
    <option>Events &amp; Entertainment</option>
    <option>Export &amp; Import</option>
    <option>Government &amp; Public Sector</option>
    <option>Healthcare</option>
    <option>Hotel, Travel &amp; Leisure</option>
    <option>Insurance</option>
    <option>IT &amp; Telecom</option>
    <option>Logistics &amp; Transportation</option>
    <option>Manufacturing</option>
    <option>Manpower &amp; Security</option>
    <option>News &amp; Media</option>
    <option>NGO &amp; Non profit</option>
    <option>Pharmaceutical</option>
    <option>Real Estate</option>
    <option>Wholesale &amp; Retail</option>
    <option>Others</option>
  </select>

SO how can i selected above list from database.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire