@extends('layouts.app') @section('title', 'Expenses') @section('breadcrumb') @endsection @section('content') {{-- Stats Cards --}}
{{ $expenses->total() }}
Total Records
Rs. {{ number_format($total, 0) }}
Total Expenses (Filtered)
{{ $expenses->count() > 0 ? $expenses->first()->expense_date?->format('M d') : '-' }}
Latest Expense
{{-- Filters --}}
{{-- Expenses Table --}}
All Expenses
{{ $expenses->total() }} records
@forelse($expenses as $expense) @empty @endforelse
Date Title Category Payment Amount Added By Actions
{{ $expense->expense_date?->format('M d, Y') ?? '-' }}
{{ $expense->title }}
@if($expense->notes) {{ Str::limit($expense->notes, 40) }} @endif
@if($expense->category) {{ $expense->category->name }} @else Uncategorized @endif @php $paymentIcon = match($expense->payment_method) { 'cash' => 'bi-cash', 'card' => 'bi-credit-card', 'bank_transfer' => 'bi-bank', default => 'bi-wallet2' }; @endphp {{ ucfirst(str_replace('_', ' ', $expense->payment_method ?? 'cash')) }} Rs. {{ number_format($expense->amount, 2) }} {{ $expense->user?->name ?? '-' }}
@csrf @method('DELETE')

No expenses recorded

Add First Expense
@if($expenses->hasPages())
{{ $expenses->links() }}
@endif
@endsection