@foreach($options as $option)
<option value="{{$option->id}}"
@if($errors->has($name)) class="neg" @endif
- @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->id === $option->id) selected @endif @endif
+ @if(isset($model) || old($name)) @if(old($name) && old($name) === $option->id) selected @elseif(isset($model) && $model->role->id === $option->id) selected @endif @endif
>
{{ $option->$displayKey }}
</option>
@if($currentUser->can('user-update'))
<div class="form-group">
<label for="role">User Role</label>
- @include('form/model-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name'])
+ @include('form.role-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name'])
</div>
@endif