index.blade.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @extends('backend.layouts.app')
  2. @section('content')
  3. <div class="aiz-titlebar text-left mt-2 mb-3">
  4. <div class="row align-items-center">
  5. <!--<div class="col-md-6">-->
  6. <!-- <h1 class="h3">{{translate('All Coupons')}}</h1>-->
  7. <!--</div>-->
  8. <div class="col-md-6 text-md-left">
  9. <a href="{{ route('coupon.create') }}" class="btn btn-circle btn-info">
  10. <span>{{translate('Add New Coupon')}}</span>
  11. </a>
  12. </div>
  13. </div>
  14. </div>
  15. <div class="card">
  16. <div class="card-header">
  17. <h5 class="mb-0 h6">{{translate('Coupon Information')}}</h5>
  18. </div>
  19. <div class="card-body">
  20. <table class="table aiz-table p-0">
  21. <thead>
  22. <tr>
  23. <th data-breakpoints="lg">#</th>
  24. <th>{{translate('Code')}}</th>
  25. <th data-breakpoints="lg">{{translate('Type')}}</th>
  26. <th data-breakpoints="lg">{{translate('Start Date')}}</th>
  27. <th data-breakpoints="lg">{{translate('End Date')}}</th>
  28. <th width="10%">{{translate('Options')}}</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. @foreach($coupons as $key => $coupon)
  33. <tr>
  34. <td>{{$key+1}}</td>
  35. <td>{{$coupon->code}}</td>
  36. <td>@if ($coupon->type == 'cart_base')
  37. {{ translate('Cart Base') }}
  38. @elseif ($coupon->type == 'product_base')
  39. {{ translate('Product Base') }}
  40. @endif</td>
  41. <td>{{ date('d-m-Y', $coupon->start_date) }}</td>
  42. <td>{{ date('d-m-Y', $coupon->end_date) }}</td>
  43. <td class="text-right">
  44. <a class="btn btn-soft-primary btn-icon btn-circle btn-sm" href="{{route('coupon.edit', encrypt($coupon->id) )}}" title="{{ translate('Edit') }}">
  45. <i class="las la-edit"></i>
  46. </a>
  47. <a href="#" class="btn btn-soft-danger btn-icon btn-circle btn-sm confirm-delete" data-href="{{route('coupon.destroy', $coupon->id)}}" title="{{ translate('Delete') }}">
  48. <i class="las la-trash"></i>
  49. </a>
  50. </td>
  51. </tr>
  52. @endforeach
  53. </tbody>
  54. </table>
  55. </div>
  56. </div>
  57. @endsection
  58. @section('modal')
  59. @include('modals.delete_modal')
  60. @endsection