Skip to content

Instantly share code, notes, and snippets.

@icemancast
Created January 25, 2016 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save icemancast/9fdb64c9fc1eb4e7b225 to your computer and use it in GitHub Desktop.
Save icemancast/9fdb64c9fc1eb4e7b225 to your computer and use it in GitHub Desktop.
loop through selection
<select id="group-categories" name="group-categories" multiple class="form-control">
@foreach($categories as $id => $category)
@if($category == $group->category)
<option value="{{ $id }}" selected>{{ $category }}</option>
@else
<option value="{{ $id }}">{{ $category }}</option>
@endif
@endforeach
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment