@extends('layouts.admin.master') @section('title', 'Member Card') @section('content') Member Card Add New Member Card Clear Save Member Card Info @csrf Customer Name * Select- @if (count($customers) != 0) @foreach ($customers as $customer) {{ $customer['customer_name'] }} @endforeach @endif @error('customer') {{ $message }} @enderror Card Type Name * Select- @if (count($memberCardTypes) != 0) @foreach ($memberCardTypes as $memberCardType) {{ $memberCardType['member_card_type_name'] }} @endforeach @endif @error('member_card_type') {{ $message }} @enderror Amount Discount Percent Discount Card Code * @error('card_code') {{ $message }} @enderror Create Date * @error('create_date') {{ $message }} @enderror Expire Date * @error('expire_date') {{ $message }} @enderror Remark {{ old('remark') }} Discontinued Member Card Lists No Card Code Customer Name Phone Number Card Type Name Discount Type Amount Discount Percentage Discount Create Date Expire Date Expired Remark Discontinued Edit Delete @if (count($memberCards) != 0) @php $count = 1; @endphp @foreach ($memberCards as $memberCard) {{ $count }} {{ $memberCard['member_card_code'] }} {{ $memberCard['customer_name'] }} {{ $memberCard['phone_number'] }} {{ $memberCard['member_card_type_name'] }} {{ $memberCard['discount_type'] }} {{ $memberCard['amount_discount'] }} {{ $memberCard['percent_discount'] }} {{ date('d-M-Y', strtotime($memberCard['create_date'])) }} {{ date('d-M-Y', strtotime($memberCard['expire_date'])) }} @php $expireDate = \Carbon\Carbon::parse($memberCard['expire_date']); // Replace this with your actual expiry date @endphp @if (\Carbon\Carbon::now()->gt($expireDate)) @else @endif {{ $memberCard['member_card_remark'] }} @if ($memberCard['member_card_is_discontinued'] == 0) @elseif ($memberCard['member_card_is_discontinued'] == 1) @endif @php $count++; @endphp @endforeach @endif Update Member Card @csrf Customer Name * @if (count($customers) != 0) @foreach ($customers as $customer) {{ $customer['customer_name'] }} @endforeach @endif Card Type Name * @if (count($memberCardTypes) != 0) @foreach ($memberCardTypes as $memberCardType) {{ $memberCardType['member_card_type_name'] }} @endforeach @endif Amount Discount Percent Discount Card Code * Create Date * Expire Date * Remark Discontinued @csrf Are you sure want to delete? @endsection