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');