x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:49:38 +08:00
parent 8d9d627a40
commit 135e6a7139
+6 -3
View File
@@ -27,12 +27,15 @@ Route::get('/report/x1', function(){
});
foreach($months as $month => $bookings){
dd($bookings->sum('bia'));
// echo "<h3>".$month."(".$bookings->map(function ($row) { return $row->sum('bia'); }).")</h3><br>";
$day = $bookings->groupBy(function($item){
echo "<h1>".$month."(".$bookings->sum('bia').")</h1><br><br><br>";
$days = $bookings->groupBy(function($item){
return $item->created_at->format('Y-m-d');
});
foreach($days as $day => $bookings ){
echo "<h6>".$day."(".$bookings->sum('bia').")</h6><br>";
}
}
});