@extends('admin.layout.layout') @section('content')

Coupons

Add Coupon {{-- Displaying The Validation Errors: https://laravel.com/docs/9.x/validation#quick-displaying-the-validation-errors AND https://laravel.com/docs/9.x/blade#validation-errors --}} {{-- Determining If An Item Exists In The Session (using has() method): https://laravel.com/docs/9.x/session#determining-if-an-item-exists-in-the-session --}} {{-- Our Bootstrap success message in case of updating admin password is successful: --}} @if (Session::has('success_message')) @endif
{{-- DataTable --}} {{-- using the id here for the DataTable --}} @foreach ($coupons as $coupon) @endforeach
ID Coupon Code Coupon Type Amount Expiry Date Status Actions
{{ $coupon['id'] }} {{ $coupon['coupon_code'] }} {{ $coupon['coupon_type'] }} {{ $coupon['amount'] }} @if ($coupon['amount_type'] == 'Percentage') % @else INR @endif {{ $coupon['expiry_date'] }} @if ($coupon['status'] == 1) {{-- Using HTML Custom Attributes. Check admin/js/custom.js --}} {{-- Icons from Skydash Admin Panel Template --}} @else {{-- if the admin status is inactive --}} {{-- Using HTML Custom Attributes. Check admin/js/custom.js --}} {{-- Icons from Skydash Admin Panel Template --}} @endif {{-- Icons from Skydash Admin Panel Template --}} {{-- Confirm Deletion JS alert and Sweet Alert --}} {{-- --}} {{-- --}} {{-- Icons from Skydash Admin Panel Template --}} {{-- --}} {{-- Icons from Skydash Admin Panel Template --}}
@endsection