@if (count($CompanyDetails) > 0) {{-- User Name User Email --}} Company Name Company Email Director Name Reference Name Register Date Maintenance Status Maintenance Stop Date ID Amount's Maintenance Amount's Total ID Status Kyc ACTION @foreach ($CompanyDetails as $CD) @php $offerAmount = App\Models\Transaction::where([ 'status' => 'success', 'type' => 'offer', 'company_id' => $CD['id'], ])->sum('total_paid_amount'); $maintenanceAmount = App\Models\Transaction::where([ 'status' => 'success', 'type' => 'maintenance', 'company_id' => $CD['id'], ])->sum('total_paid_amount'); $TotalID = App\Models\Transaction::where([ 'status' => 'success', 'type' => 'offer', 'company_id' => $CD['id'], ])->sum('no_of_id'); $TotalAgreement = App\Models\CompanyContract::where([ 'company_id' => $CD['id'], ])->count(); @endphp {{-- {{ $CD['first_name'] . ' ' . $CD['last_name'] }} {{ $CD['email'] }} --}} {{ $CD['company_name'] }} {{ $CD['company_email'] }} {{ $CD['director_name'] }} {{ $CD['customer_name'] }} {{-- {{ $CD['company_category'] }} --}} {{ date('d M Y', strtotime($CD['created_at'])) }} {!! checkStatus($CD['main_process']) !!} {{ $CD['main_process'] == 'stop' ? date('d M Y', strtotime($CD['main_start_date'])) . '-' . date('d M Y', strtotime($CD['main_end_date'])) : '-' }} {{ getCurrency() . $offerAmount }} {{ getCurrency() . $maintenanceAmount }} {{ $TotalID }} {!! checkStatus($CD['is_approved']) !!} {!! checkStatus($CD['contract']) !!}
@endforeach {{ $CompanyDetails->appends(request()->query())->links() }} @else

{{ 'No Record Found!' }}

@endif