

        <!-- /.card-header -->
        <div class="card-body">
                <form id="validation2" action="{{route('admin::update_product',$productedit['id'])}}" method="POST" enctype="multipart/form-data">
                    @csrf
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label for="exampleInputEmail1">Preview Image</label>
                                <img src="{{asset($productedit['product_image'])}}" alt="No Picture Found" style="width: auto;height: 200px;object-fit: cover;">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label for="exampleInputFile">Edit Product Image</label><span style="color:red;">*</span>
                                <div class="input-group">
                                    <div class="custom-file">
                                        <input type="file" class="custom-file-input" name="product_image" id="exampleInputFile">
                                        <label class="custom-file-label" for="exampleInputFile">Choose file</label>
                                    </div>
                                    <div class="input-group-append">
                                        <span class="input-group-text">Upload</span>
                                    </div>
                                </div>
                            </div>

                            @if ($errors->has('product_image'))
                                <span class="alert alert-danger">{{ $errors->first('product_image') }}</span>
                            @endif
                        </div>
                    </div>
                    <br>

                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label for="category_id">Category</label>
                                <select name="cat_id" id="category_id" class="form-control">
                                    @foreach($categories as $category)
                                        <option value="{{ $category->id }}" {{ $productedit['cat_id'] == $category->id ? 'selected' : '' }}>{{ $category->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                            @if ($errors->has('cat_id'))
                                <span class="alert alert-danger">{{ $errors->first('cat_id') }}</span>
                            @endif
                        </div>
                    </div>
                   <br>


                   <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label for="category_id">Product Varrient</label>
                                <!-- <select name="cat_id" id="category_id" class="form-control">
                                    @foreach($categories as $category)
                                        <option value="{{ $category->id }}" {{ $productedit['cat_id'] == $category->id ? 'selected' : '' }}>{{ $category->name }}</option>
                                    @endforeach
                                </select> -->
                                <select name="product_tag" class="form-control" id="">
                                    <option value="">Select...</option>
                                    <option value="1" {{ $productedit['product_tag'] == 1 ? 'selected' : '' }}>Top Sale</option>
                                    <option value="2" {{ $productedit['product_tag'] == 2 ? 'selected' : '' }}>Best Sellers</option>
                                    
                                </select>
                            </div>
                            @if ($errors->has('cat_id'))
                                <span class="alert alert-danger">{{ $errors->first('cat_id') }}</span>
                            @endif
                        </div>
                    </div>
                   <br>

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


                        </div>
                    </div>
                    <br>


                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label>Product Description</label>
                                <!-- <input type="text" name="product_dec" class="validate[required] form-control" placeholder="Enter ..." value="{{$productedit['product_dec']}}"> -->
                                <textarea name="product_dec" class="form-control">{{$productedit['product_dec']}}</textarea>
                            </div>
                            @if ($errors->has('product_dec'))
                                <span class="alert alert-danger">{{ $errors->first('product_dec') }}</span>
                            @endif


                        </div>
                    </div>
                    <br>

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


                        </div>
                    </div>
                    <br>

                    <div class="row">
                        <div class="col-sm-12">
                            <div class="form-group">
                                <label>Product Quantity</label>
                                <input type="text" name="product_quantity" class="form-control" value="{{$productedit['product_quantity']}}" placeholder="Enter ...">
                            </div>
                            @if ($errors->has('product_quantity'))
                                <span class="alert alert-danger">{{ $errors->first('product_quantity') }}</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>
