x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:45:35 +08:00
parent 88a1a5f24d
commit 0aabeac5ff
+1 -3
View File
@@ -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 "<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');