From 0016999e318fa9330ea8396eb8569026d6caed26 Mon Sep 17 00:00:00 2001 From: abourtnik Date: Wed, 20 Mar 2024 18:12:12 +0100 Subject: [PATCH] fix : show latest invoices --- app/Http/Controllers/User/InvoiceController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/User/InvoiceController.php b/app/Http/Controllers/User/InvoiceController.php index 39682f7b..6d874a58 100644 --- a/app/Http/Controllers/User/InvoiceController.php +++ b/app/Http/Controllers/User/InvoiceController.php @@ -13,7 +13,9 @@ class InvoiceController public function index(): View { return view('users.invoices.index', [ - 'invoices' => Transaction::where('user_id' , Auth::user()->id)->paginate() + 'invoices' => Transaction::where('user_id' , Auth::user()->id) + ->latest('date') + ->paginate() ]); }