From b9abf4fe1a12b4e5cc8882cd482aca961a50641c Mon Sep 17 00:00:00 2001 From: Sofiane Lasri-Trienpont <alasri250@gmail.com> Date: Sat, 22 Feb 2025 10:36:51 +0100 Subject: [PATCH] feat: add last month date range to statistics in HomeController Added a new date range for "Last Month" in the statistics filters of the HomeController, enhancing the data analysis capabilities for users. --- app/Http/Controllers/Admin/HomeController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 5dc8161..527b621 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -57,6 +57,7 @@ public function index(Request $request): View now()->subDays(7)->format('Y-m-d') => 'Les 7 derniers jours', now()->subDays(30)->format('Y-m-d') => 'Les 30 derniers jours', now()->startOfMonth()->format('Y-m-d') => 'Ce mois-ci', + now()->subMonth()->startOfMonth()->format('Y-m-d') => 'Le mois dernier', ]; if ($visits->isNotEmpty()) { -- GitLab