Created
January 25, 2016 21:06
-
-
Save icemancast/9fdb64c9fc1eb4e7b225 to your computer and use it in GitHub Desktop.
loop through selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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