pending customer po grouped by customer

This commit is contained in:
omair saleh
2020-12-07 11:50:37 +08:00
parent 1460406f4e
commit 4494fcbc53
+3 -1
View File
@@ -96,7 +96,9 @@ Route::group(['middleware' => ['role:admin']], function() {
})->get();
$customers = $bookings->groupBy(function($item) {
return $item->user_id;
})->order();
})->sortBy(function($item){
return count($item);
});
echo "<h1>Total Po Pending Customer Update: <b>".count($bookings)."</b></h1>";
foreach ($customers as $customer => $bookings) {
echo "<h3>".$customer."(".count($bookings).")</h3><br>";