Привет. Я хочу отобразить раскрывающийся список стран и штатов из пакета. Я застрял, чтобы отобразить его в своем блейде. Кто-нибудь хотел бы мне помочь?
<div class="form-group pmd-textfield pmd-textfield-floating-label ">
<label>Country</label>
<select name= "" class="form-control">
<option value="">Select Country</option>
@foreach ($country as $country)
<option>{{$country}}</option>
@endforeach
</select><span class="pmd-textfield-focused"></span>
</div>
<div class="form-group pmd-textfield pmd-textfield-floating-label ">
<label for="type_id">State</label>
<select name= "state" id="stateId" class="states order-alpha form-control">
<option value="">Select State</option>
</select><span class="pmd-textfield-focused"></span>
</div>
controller
public function create()
{
$countries = Countries::where('geo.subregion', "South-Eastern Asia");
$country = $countries->pluck('name.common');
$state = $countries->where('cca2', $state)->first()->hydrateStates()->states->pluck('name');
return view('job.create', compact('country'));
}
The country show all the countries name through pluck.Now i need to have drop down for my state which need to be dependent on the country name.How shall i do that ?