PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/www/__templates/forms/horizontal/select.blade.php

https://bitbucket.org/mdoviedor/hotelium
PHP | 17 lines | 15 code | 2 blank | 0 comment | 0 complexity | 2444b472d52ee62a1d75c43181630866 MD5 | raw file
 1<div class="form-group{{ $errors->has("$id") ? ' has-error' : '' }}">
 2    <label for="{{ $id  }}" class="col-sm-2 control-label">{{ $name }}</label>
 3    <div class="col-sm-10">
 4
 5        <select class="form-control" name="{{ $id }}" id="{{ $id }}">
 6            @foreach($values as $key =>  $value)
 7                <option value="{{ $key }}">{{ $value }}</option>
 8            @endforeach
 9
10        </select>
11        @if ($errors->has("$id"))
12            <span class="help-block">
13                <strong>{{ $errors->first("$id") }}</strong>
14            </span>
15        @endif
16    </div>
17</div>