@extends('admin.layouts.base')
@section('content')
    <div class="layui-card">
        <div class="layui-card-header layuiadmin-card-header-auto">
            <h2>类型</h2>
        </div>
        <div class="layui-card-body">
            <form class="layui-form" action="/admin/agent/charge/setting/update" method="post">
                {{csrf_field()}}
                <div class="layui-form-item">
                    <label class="layui-form-label"style="width: 100px;"><strong class="item-required">*</strong>成为会员类型</label>
                    <div class="layui-input-block">
                        <input type="radio" name="type"   value="1" title="一次充值"  @if($setting->type == 1) checked @endif>
                        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i>
                            <div>一次充值</div>
                        </div>
                        <input type="radio" name="type"   value="2" title="累计充值" @if($setting->type == 2) checked @endif>
                        <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i>
                            <div>累计充值</div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
            <label class="layui-form-label" style="width: 100px;">复选框</label>
            <div class="layui-input-block">
                        @foreach($type as $item)
                     <input type="checkbox" name="category[]" value="{{$item->id}}" title="{{$item->name}}"
                            @if(in_array($item->id,$setting->category)) checked @endif>
                        @endforeach
              </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn" lay-submit="" lay-filter="formDemo">确 认</button>
                        <a  class="layui-btn" href="{{route('admin.apply')}}"  >返 回</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection
