x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 11:25:32 +08:00
parent 9048b3d213
commit 3671a8b8eb
+1 -1
View File
@@ -21,7 +21,7 @@ Route::get('/', 'WelcomeController@index');
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.request');
Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('password.reset');
Route::get('/report/x1', function(){
$bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x1_%')->where('is_cancel', false)->whereNot('user_id', 1)->whereYear('created_at', 2020)->get();
$bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x1_%')->where('is_cancel', false)->where('user_id', '!=', 1)->whereYear('created_at', 2020)->get();
$months = $bookings->groupBy(function($item) {
return $item->created_at->format('Y-m');
});