From 515badf8e48e181a3d7f4dab628a29b3d21a0ebf Mon Sep 17 00:00:00 2001 From: omair saleh Date: Fri, 25 Sep 2020 17:55:38 +0800 Subject: [PATCH] show old invoices --- routes/web.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 31177f9a..4eeb7ff2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,7 +16,8 @@ Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('p Route::get('/old-invoices', function(){ $bookings = \App\Booking::where('status', 6)->whereHas('purchaseOrder', function($q){ $q->whereNotNull('image_path'); - })->get(); + })->groupby('year','month')->get(); + dd($bookings); echo "

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

"; foreach ($bookings as $booking) { echo "".$booking->id." date: ".$booking->created_at."
";