One of the requirements in an application that I am building is for a form input which takes in a varying number of items for a single field. For instance, sports that I play ar
This might be a better approach than top answer if you need to compare 2 output arrays to each other but use the first array to populate the options.
This is also helpful when you have a non-numeric or offset index (key) in your array.
@foreach($roles as $key => $value) {{$value}} @endforeach