From 658c90e5ff5ac53e9b35e04dd6afa3473d85b70e Mon Sep 17 00:00:00 2001 From: omair saleh Date: Fri, 25 Sep 2020 18:06:46 +0800 Subject: [PATCH] show old invoices --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index f97719d8..f782143e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -20,7 +20,7 @@ Route::get('/old-invoices', function(){ $q->whereNotNull('image_path'); })->get(); dd($bookings->groupBy(function($item) { - return Carbon::createFromFormat('Y-m-d', $item->date)->format('Y-W'); + return Carbon::createFromFormat('Y-m-d', $item->created_at)->format('Y-W'); })); echo "

Total pending invoices:".count($bookings)."

"; foreach ($bookings as $booking) {