jeudi 5 avril 2018

Laravel + Magento - Retrieve list of all countries from Magento

In my application it is required to have a list of all the countries from Magento. Now I found a link in the Magento DevDocs which has a Country API. But how can I implement the list of all the countries in my Application by using for, instance, a foreach? I need the list so I can insert the selected value into my database. This is the link that I found: Link to the docs

This is the form where It needs to be displayed:

<div class="form-group">
 <span class="andcode-dropdown">
  <label for="country" class="label-muted">Land <span class="required">* 
  </span></label>
  <select class="form-control andcode-select" name="country_name" id="country">
   <option selected>Kies een land...</option>
   @foreach($countries as $country)
   <option></option>
   @endforeach
  </select>
 </span>
</div>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire