I am able to fetch all names of the city belonging to the country being selected, but my issue lies with displaying all the cities in a label form. This is how my output looks like:
output
["Barcelona","Atlanta"]
How can i make the output look this way:
Barcelona
Atlanta
HTML
@foreach($countries as $country)
<div class="panel">
{!!$country->city()->pluck('name');!!}
</div>
@endforeach
PS: New with laravel!