

        <!-- /.card-header -->
        <div class="card-body">
                <form id="validation2" action="{{route('admin::update_category',$subcategories['id'])}}" method="POST" enctype="multipart/form-data">
                    @csrf

                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label>Select Main Category</label>
                                <select name="maincatid" class="form-control" id="">
                                    <option value="">Select...</option>
                                    <!-- <option value="3">Intimates &amp; Adult Products</option>
                                    <option value="4">Gifts, Candles &amp; Accessories</option>
                                    <option value="5">Active Wear &amp; Fitness Wear</option> -->
                                    @foreach($categories as $category)
                                        <option value="{{ $category->id }}" {{$subcategories['maincatid'] == $category->id ? 'selected' : '' }}>{{ $category->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                            @if ($errors->has('maincatid'))
                                <span class="alert alert-danger">{{ $errors->first('maincatid') }}</span>
                            @endif


                        </div>
                    </div>
                    <br>
                    

                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label>Sub Category Name</label>
                                <input type="text" name="subcatname" class="form-control" placeholder="Enter ..." value="{{$subcategories['subcatname']}}">
                            </div>
                            @if ($errors->has('subcatname'))
                                <span class="alert alert-danger">{{ $errors->first('subcatname') }}</span>
                            @endif


                        </div>
                    </div>
                    <br>

                   
                    <!-- input states -->

                    <div class="row">

                        <div class="col-md-12">
                            <div class="form-group" style="text-align:center">
                                <input type="submit" value="Submit" class="btn btn-primary">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- /.card-body -->

        <script type="text/javascript">
            jQuery("#validation2").validationEngine({promptPosition: 'inline'});
            $('.select2').select2();
        </script>
