jeudi 27 février 2020

How to avoid repeated data in a select using Laravel?

I have this select

enter image description here

I'm getting all of this information from a table in my database... so I have some repeated rows... I would like to found a kind of if or something to avoid the repeated information in the select... this is my select

<div class="form-group row col-xs-3 col-md-4" >
<label class="control-label col-md-4" >Cartera: </label>
<div class="col-md-8">
 <select name="carteras_id" id="carteras_id" class="form-control">
@foreach ($carteras as $cartera)
  <option value="" class="form-control"></option>
@endforeach
</select>
</div>


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire