x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:56:31 +08:00
parent c65d8d2308
commit 38ee75aa6c
+2 -2
View File
@@ -27,13 +27,13 @@ Route::get('/report/x1', function(){
});
foreach($months as $month => $bookings){
echo "<h1>".$month."(".$bookings->sum('bia').")</h1><br>";
echo "<h1>".Carbon::parse($month)->format('m-Y')."(".$bookings->sum('bia').")</h1>";
$days = $bookings->groupBy(function($item){
return $item->created_at->format('Y-m-d');
});
foreach($days as $day => $bookings ){
echo "<h3>".$day."(".$bookings->sum('bia').")</h3>";
echo "<p>".Carbon::parse($day)->format('d-m-Y').": (".$bookings->sum('bia').")</p>";
}
}