diff --git a/routes/web.php b/routes/web.php index 091224d3..1f404211 100644 --- a/routes/web.php +++ b/routes/web.php @@ -18,11 +18,12 @@ 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(function($item) { + })->get(); + $months = $bookings->groupBy(function($item) { return $item->created_at->format('Y-m'); }); echo "