<div class="layui-form-item {{ $errors->has('$name') ? 'has-error' : '' }}">
    <label class="layui-form-label" style="padding: 0px;">{{ $label }}</label>
    <div class="layui-input-block">
        @if(!isset($type) || $type === 'input')
            <input {{ isset($id) ? 'id="' . $id . '"' : ''  }} type="{{ isset($input_type) ? $input_type : 'text' }}" name="data[{{ $name }}]" value="{{ $value }}" placeholder="{{ isset($placeholder) ? $placeholder : '请输入' . $label }}" class="layui-input" {{ (isset($required) && $required) ? 'required lay-verify="required' . (isset($verify) ? $verify : '') . '"' : '' }} autocomplete="off" {{  isset($disable) && $disable ? 'disabled' : '' }}>
        @elseif($type === 'date')
            <input {{ isset($id) ? 'id=' . $id . '' : ''  }} type="{{ isset($input_type) ? $input_type : 'text' }}" name="data[{{ $name }}]" value="{{ $value }}" placeholder="{{ isset($placeholder) ? $placeholder : '请输入' . $label }}" class="layui-input sg-select-date sg-date-select" {{ (isset($required) && $required) ? 'required lay-verify=required' . (isset($verify) ? $verify : '') . '' : '' }} autocomplete="off">
        @elseif($type === 'textarea')
            <textarea {{ isset($id) ? 'id="' . $id . '"' : ''  }} name="data[{{ $name }}]" placeholder="{{ isset($placeholder) ? $placeholder : '请输入' . $label }}" class="layui-textarea" {{ (isset($required) && $required) ? 'required lay-verify="required"' : '' }} autocomplete="off">{{ $value }}</textarea>
        @elseif($type === 'radio')
            @foreach($options as $option)
                <input type="radio" name="data[{{ $name }}]" value="{{ $option['id'] }}" title="{{ $option['name'] }}" {{ ($selected_id == $option['id']) ? 'checked' : '' }} {{  isset($filter) && $filter ? 'lay-filter=' . $filter : '' }}>
            @endforeach
        @elseif($type === 'select')
            <select name="data[{{ $name }}]" {{ (isset($required) && $required) ? 'required lay-verify="required"' : '' }} autocomplete="off" {{  isset($disable) && $disable ? 'disabled' : '' }} {{  isset($filter) && $filter ? 'lay-filter=' . $filter : '' }} >
                @foreach($options as $option)
                    <option value="{{ $option['id'] }}" {{ ($selected_id == $option['id']) ? 'selected' : '' }}>{{ $option['name'] }}</option>
                @endforeach
            </select>
        @elseif($type === 'multi-select')
            @include('share.multi-select', ['id' => $id, 'name' => $name, 'options' => $options, 'selected_ids' => $selected_ids])
        @elseif($type === 'upload-image')
            @include('share.upload-images', ['name' => $name, 'type' => $upload_type, 'value' => $value, 'class' => (isset($class) ? $class : '')])
        @elseif($type === 'upload-file')
            @include('share.upload-files', ['name' => $name, 'type' => $upload_type, 'value' => $value, 'class' => (isset($class) ? $class : '')])
        @endif
        @if($errors->has($name))
            <span class="help-block">{{ $errors->first($name) }}</span>
        @endif
    </div>
</div>