@extends('components.customer_layout') @section('customer-content')

My Payment Order List

@if(session('success'))
{{ session('success') }}
@endif @if($applications->isEmpty())

No applications found.

@else @foreach($applications as $application) @php $modelClass = $application->model; $orders = $application->model::where('order_payment', 1) ->where('id',$application->request_id)->get(); // dd($orders); @endphp @if(count($orders) >= 1) {{-- Check if $orders is not empty --}} @endif @endforeach
ID Customer Service Office Status Actions
{{ $application->id }} {{ $application->customer->full_name ?? 'N/A' }} {{ $application->service->name ?? 'N/A' }} {{ $application->office->name ?? 'N/A' }} @php $orders = $application->model::where('order_payment', 1) ->where('id',$application->request_id)->get(); $status = $application->model::where('order_payment', 1) ->where('id',$application->request_id)->first(); $payment=$status->paid_amount; @endphp @if($payment == '') @elseif($payment != '') Paid @endif @if($payment == '') @elseif($payment != '') Paid @endif
@endif
@endsection