Current File : //home/tradevaly/new.tradevaly.com.bd/resources/views/backend/pages/package/index.blade.php
 @extends('backend.ayaan.master')

@section('title') Package @endsection
@section('css')
    <!-- DataTables -->
    <link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('content')

    @component('components.breadcrumb')
        @slot('li_1') Dashboard @endslot
        @slot('title') Packages @endslot
    @endcomponent
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <div class="row mb-2">
                        <div class="col-sm-4"></div>
                        <div class="col-sm-8">
                            <div class="text-sm-end">
                                <a href="{{url('b2b/package/add')}}"
                                    class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i
                                        class="mdi mdi-plus me-1"></i> Add New Package</a>
                            </div>
                        </div><!-- end col-->
                    </div>

                    <div class="table-responsive">
                        <table class="table" id="datatable-buttons">
                          <thead>
                            <tr>
                              <th class="text-center">#</th>
                              <th>{{translate("Image")}}</th>
                              <th>{{translate("Name")}}</th>
                              <th>{{translate("Price")}}</th>
                              <th>{{translate("Features")}}</th>
                              <th>{{translate("Details")}}</th>
                              <th class="text-right">{{translate("Actions")}}</th>
                            </tr>
                          </thead>
                          <tbody>
                            @php
                               $i = 0;
                            @endphp
                            @foreach ($packages as $package)
                            <tr>
                              <?php $i++; 
                              ?>
                              <td class="text-center">{{$i}}</td>
                              <td><img style="height: 50px; width:50px; border-radius:50%;" src="{{asset('storage/images/admin/package/'.$package['image'])}}" alt=""></td>
                              <td>{{$package['name']}}</td>
                              <td>৳ {{$package['price']}}</td>
                              <td>
                                 <a  class="btn btn-info" title="Featured" style="color: #fff" href="{{ route('admin.package.featured', $package['id']) }}">
                                 Features
                                </a>
                              </td>
                              <td width="300px">{!! Str::limit($package['details'],150) !!}</td>
                              <td class="td-actions text-right">
                                @if ($package['status']==0)
                                <a  class="btn btn-info updatePackageStatus" title="Turn off / On" id="package-{{$package->id}}" package_id="{{$package->id}}" style="color: #fff">
                                <i class="fa fa-toggle-off" status="Disable"></i>
                                </a>
                                @else
                                <a  class="btn btn-info updatePackageStatus" title="Turn off / On" id="package-{{$package->id}}" package_id="{{$package->id}}" style="color: #fff">
                                  <i class="fa fa-toggle-on" status="Active"></i>
                                </a>
                                @endif
                                <a href="{{url('b2b/package/edit',$package->id)}}" name="package" class="btn btn-warning" title="Edit" style="color: #fff" title="Edit">
                                  <i class="fa fa-list-alt" aria-hidden="true"></i>
                                </a>
                                <a href="{{url('b2b/package/delete',$package->id)}}" name="package" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff" title="Delete">
                                  <i class="fa fa-trash" aria-hidden="true"></i>
                                </a>
                              </td>
                            </tr>
                            @endforeach
                          </tbody>
                        </table>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
    <!-- end row -->
    
    
@endsection
@section('script')
    <!-- Required datatable js -->
    <script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
    <script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
    <!-- Datatable init js -->
     
    <script type="text/javascript">
  $(function () {
    
    
    
    
    $(document).ready(function () {
 
  var table = $('#datatable-buttons').DataTable({
    lengthChange: false,
    processing: true,
    dom: 'Bfrtip',
        
    buttons: ['copy', 'excel', 'pdf', 'colvis']
  });
  table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
  $(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection




{{--  @extends('backend.layouts.app')

@push('style')
    
@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">
          <div class="card-icon">
            <i class="material-icons">Visibility</i>
          </div>
          <h4 class="card-title">{{translate("Packages Table")}}</h4>
        </div>
        <div class="card-body">
          <div class="table-responsive">
            <table class="table">
              <thead>
                <tr>
                  <th class="text-center">#</th>
                  <th>{{translate("Image")}}</th>
                  <th>{{translate("Name")}}</th>
                  <th>{{translate("Price")}}</th>
                  <th>{{translate("Features")}}</th>
                  <th>{{translate("Details")}}</th>
                  <th class="text-right">{{translate("Actions")}}</th>
                </tr>
              </thead>
              <tbody>
                @php
                   $i = 0;
                @endphp
                @foreach ($packages as $package)
                <tr>
                  <?php $i++; 
                  ?>
                  <td class="text-center">{{$i}}</td>
                  <td><img style="height: 50px; width:50px; border-radius:50%;" src="{{asset('storage/images/admin/package/'.$package['image'])}}" alt=""></td>
                  <td>{{$package['name']}}</td>
                  <td>৳ {{$package['price']}}</td>
                  <td>
                     <a  class="btn btn-info" title="Featured" style="color: #fff" href="{{ route('admin.package.featured', $package['id']) }}">
                     Features
                    </a>
                  </td>
                  <td width="300px">{!! Str::limit($package['details'],150) !!}</td>
                  <td class="td-actions text-right">
                    @if ($package['status']==0)
                    <a  class="btn btn-info updatePackageStatus" title="Turn off / On" id="package-{{$package->id}}" package_id="{{$package->id}}" style="color: #fff">
                    <i class="material-icons" status="Disable">toggle_off</i>
                    </a>
                    @else
                    <a  class="btn btn-info updatePackageStatus" title="Turn off / On" id="package-{{$package->id}}" package_id="{{$package->id}}" style="color: #fff">
                      <i class="material-icons" status="Active">toggle_on</i>
                    </a>
                    @endif
                    <a href="{{url('b2b/package/edit',$package->id)}}"  class="btn btn-rose" title="Edit" style="color: #fff">
                      <i class="material-icons">edit</i>
                    </a>
                    <a href="{{url('b2b/package/delete',$package->id)}}" name="package" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
                      <i class="material-icons">close</i>
                    </a>
                  </td>
                </tr>
                @endforeach
              </tbody>
            </table>
          </div>
        </div>
      </div>
  </div>
</div>
@stop

@push('script')
   
@endpush --}}