From f292c93545e822d880de6ce3636cee8445392fff Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 8 Feb 2021 19:15:37 +0800 Subject: [PATCH] show total in x1 report --- routes/web.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 49391090..0f22a29f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -24,7 +24,7 @@ Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('p Route::group(['middleware' => ['role:admin']], function() { Route::get('/report/x1', function(){ $bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x1_%')->where('is_cancel', false)->where('user_id', '!=', 1)->get(); - echo "Total: ".$bookings->sum('bia'); + echo "

Total: ".$bookings->sum('bia')."

"; $months = $bookings->groupBy(function($item) { return $item->created_at->format('Y-m'); }); @@ -50,6 +50,7 @@ Route::group(['middleware' => ['role:admin']], function() { Route::get('/report/x2', function(){ $bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x2_%')->where('is_cancel', false)->where('user_id', '!=', 1)->get(); + echo "

Total: ".$bookings->sum('bia')."

"; $months = $bookings->groupBy(function($item) { return $item->created_at->format('Y-m'); });