x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:42:33 +08:00
parent 0065a8070c
commit 8fc2fcaa90
+3 -5
View File
@@ -27,11 +27,9 @@ Route::get('/report/x1', function(){
});
foreach($months as $month => $bookings){
$total = 0;
foreach ($bookings as $booking){
$total += $booking->bia;
}
dd($total);
dd($bookings->map(function($booking){
return +$booking->bia;
}));
// echo "<h3>".$month."(".$bookings->map(function ($row) { return $row->sum('bia'); }).")</h3><br>";
$day = $bookings->groupBy(function($item){
return $item->created_at->format('Y-m-d');