@php use App\Http\Helpers\Helper; @endphp @extends("admin.main") @section("content") @if(auth()->guard('admins')->user()->can('manager coupon'))
Add New Coupon
@if(count($coupons) > 0) @foreach($coupons->all() as $item) @endforeach @endif
CODE Type Value Uses Start Date Expiry Date
{{ $item->code }} {{ (int) $item->type === 1 ? "Percentage" : "Fix Amount" }} {{ $item->discount }} {{ $item->use }}/{{ $item->count }} {{ \Illuminate\Support\Carbon::parse($item->start)->format('d/m/Y') }} {{ \Illuminate\Support\Carbon::parse($item->end)->format('d/m/Y') }} @if(auth()->guard('admins')->user()->can("delete coupon"))
@csrf @method('delete')
@endif
@else
Access Denied - You are not assigned to any Coupon management department
@endif @endsection