Current File : /home/tradevaly/new.tradevaly.com.bd/resources/views/user/pages/feature/active_product.blade.php
@extends('user.ayaan.master')

@push('style')
<link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
@endpush

@section('content')
<div class="container-fluid">
  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-header card-header-info card-header-icon">
          <h4 class="card-title">{{translate("Features Products")}}</h4>
        </div>
        <div class="card-body">
        </div>
        <div class="card-body">
          <div class="table-responsive">
            <table class="table">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>Image</th>
                  <th>{{translate("Product Name")}}</th>
                  <th>Category</th>
                  <th>Status</th>
                  <th class="text-right">{{translate("Actions")}}</th>
                </tr>
              </thead>
              <tbody>
                
                @foreach ($products as $product)
                @if($product->product)
                <tr>
                   <td class="text-center">{{$loop->iteration}}</td>
                  <td><img style="width:50px; border-radius:10%;" src="{{asset('storage/images/admin/product/'.($product->product->image ? $product->product->image:''))}}" alt=""></td>
                 
                  <td>@isset($product->product->title) {{$product->product->title}} @endif</td>
                    <td>
                  {{$product->product->category->name? $product->product->category->name:""}}
                  </td>
                  <td>
                   @if($product->status == 0)
                   <span class="badge bg-warning">Pending</span>
                   @elseif($product->status == 1)
                   <span class="badge bg-success">Approved</span>
                   @else
                   <span class="badge bg-danger">Rejeceted</span>
                   @endif
                  </td>
                 
                  <td class="td-actions text-right">
                      @if($product->status == 0)
                    
                    <a href="{{url('b2b/feature_product/requestdelete',$product->id)}}" name="about" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
                      Delete
                    </a>
                    @elseif($product->status == 1)
                    
                    
                    <a href="{{route('user.featuredlist.delete',$product->id)}}" name="about" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
                      Delete
                    </a>
                    @endif
                  </td>
                </tr>
                @endif
                @endforeach
              </tbody>
            </table>
                {{ $products->links() }}
          </div>
        </div>
      </div>
  </div>
</div>
@stop

@push('script')
   <script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
   <script>
               $(function() {
                    $('#example').select2({
                             multiple: true,
                             maximumSelectionSize: 1,
                             tags: true
                        });
                    });
   </script>
@endpush