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

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


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