title: Laravel display multiple selected values
body: <p>How can I display correctly from multiple selected value. I have tables for the suppliers that can connect to products, I used implode to combine the selected values. My problem is when retrieve only one value selected can't read the others selected</p>
  
  <pre><code>$selected = array($products-&gt;supplier_id);
  
  &lt;select  name="supplier_id[]" multiple="multiple"&gt;
     @foreach($suppliers as $supplier)
           &lt;?php  $isSelected = in_array($supplier-&gt;id,$selected) ? "selected='selected'" : ""; ?&gt;
     &lt;option {{ $isSelected }} value="{{ $supplier-&gt;id }}"&gt;{{ $supplier-&gt;name}}&lt;/option&gt;
     @endforeach
  &lt;/select&gt;
  </code></pre>