I have two select fields (City, Area). The city field's data will automatically show from the database. But Area data will be shown depends on the City from the database. No one can select the Area without selecting the City. There is (id, city_id, area_name)
column in the Area table.
Please have a look at my code:
<select name="city" id="city">
<option value="">City</option>
@foreach($citylist as $city)
<option value="{{$city->id}}">{{$city->city_name}}</option>
@endforeach
</select>
<select name="area" id="area">
<option value="">Area</option>
@foreach($arealist as $area)
<option value="{{$area->id}}">{{$area->area_name}}</option>
@endforeach
</select>
How can I do that in Laravel 7?