x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:39:43 +08:00
parent 715fe94ffc
commit 0065a8070c
+6 -2
View File
@@ -27,8 +27,12 @@ Route::get('/report/x1', function(){
});
foreach($months as $month => $bookings){
dd($bookings->map(function ($row) { return $row->sum('bia'); }));
echo "<h3>".$month."(".$bookings->map(function ($row) { return $row->sum('bia'); }).")</h3><br>";
$total = 0;
foreach ($bookings as $booking){
$total += $booking->bia;
}
dd($total);
// 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');
});