Skip to content

Commit 915245a

Browse files
authored
Merge pull request #43 from martijnr17/patch-2
Update edit-user.blade.php
2 parents 9f5c97e + be393d6 commit 915245a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/resources/views/usersmanagement/edit-user.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
@endif
105105
<div class="col-md-9">
106106
<div class="input-group">
107-
<select class="custom-select form-control" name="role" id="role">
107+
<select class="custom-select form-control" name="role[]" id="role" multiple>
108108
<option value="">{!! trans('laravelusers::forms.create_user_ph_role') !!}</option>
109109
@if ($roles)
110110
@foreach($roles as $role)
111111
@if ($currentRole)
112-
<option value="{{ $role->id }}" {{ $currentRole->id == $role->id ? 'selected="selected"' : '' }}>{{ $role->name }}</option>
112+
<option value="{{ $role->id }}" {{ in_array($role->id ,$currentRole) ? 'selected="selected"' : '' }}>{{ $role->name }}</option>
113113
@else
114114
<option value="{{ $role->id }}">{{ $role->name }}</option>
115115
@endif

0 commit comments

Comments
 (0)