From 88a1a5f24da55e65ac6c0674a0e4b092b3c06fd7 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sat, 5 Dec 2020 11:44:27 +0800 Subject: [PATCH] x1 and x2 reports --- routes/web.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/web.php b/routes/web.php index 2430a684..9658056e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -27,9 +27,9 @@ Route::get('/report/x1', function(){ }); foreach($months as $month => $bookings){ - dd($bookings->map(function($booking){ - return +$booking->bia; - })); + dd(array_sum($bookings->map(function($booking){ + return +$booking->bia; + }))); // echo "

".$month."(".$bookings->map(function ($row) { return $row->sum('bia'); }).")


"; $day = $bookings->groupBy(function($item){ return $item->created_at->format('Y-m-d');