@extends('layouts.app') @php($prefix = auth()->user()->role === 'admin' ? 'admin.' : 'user.') @section('content') @push('styles') @endpush
{{-- Success message on invoice creation --}} @if (request()->has('created') && request()->get('created') == 'true') @endif

Invoices

{{-- Future filter options can go here --}}
@forelse ($invoices as $invoice) @empty @endforelse
Invoice ID Customer Date Amount Status Action

{{ $invoice->invoice_number }}

{{-- This hidden p tag holds the URL for the copy button. Passing the full object is cleaner. --}}

{{ $invoice->brand->name }}

{{ $invoice->customer_name }}

{{ $invoice->customer_email }}

{{ $invoice->created_at->format('d M, Y') }}

Due: {{ $invoice->due_date->format('d M, Y') }}

{{ number_format($invoice->amount, 2) }} BDT

{{ ucfirst($invoice->payment_status) }}
View Edit
@csrf @method('DELETE')

No invoices found matching your search.

@endsection @push('scripts') @endpush