@extends('layouts.app') @section('title', 'Customers') @section('page-title', 'Customers') @section('page-subtitle', 'Manage customer accounts') @section('content')
@if(request('search')) Clear @endif

Total Customers

{{ $customers->total() }}

Avg Licenses/Customer

{{ $customers->count() > 0 ? round($customers->sum('total_licenses') / $customers->count(), 1) : 0 }}

Total Active Licenses

{{ $customers->sum('active_licenses') }}

Total Revenue

${{ number_format($customers->sum('active_licenses') * 50) }}

@forelse($customers as $customer) @empty @endforelse
Customer Total Licenses Active Licenses Revenue Last License Actions
{{ strtoupper(substr($customer->customer_name, 0, 1)) }}{{ strtoupper(substr(explode(' ', $customer->customer_name)[1] ?? 'X', 0, 1)) }}

{{ $customer->customer_name }}

{{ $customer->customer_email }}

{{ $customer->total_licenses }} {{ $customer->active_licenses }} ${{ number_format($customer->active_licenses * 50) }} {{ \Carbon\Carbon::parse($customer->last_license_date)->format('M d, Y') }}
View
@csrf @method('DELETE')

No customers found

@if($customers->count() > 0)
{{ $customers->links() }}
@endif
@endsection