x1 and x2 reports

This commit is contained in:
omair saleh
2020-12-05 12:04:47 +08:00
parent b7003b4f15
commit c48d439441
+2 -2
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)->where('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)->get();
$months = $bookings->groupBy(function($item) {
return $item->created_at->format('Y-m');
});
@@ -40,7 +40,7 @@ Route::get('/report/x1', function(){
});
Route::get('/report/x2', function(){
$bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x2_%')->where('is_cancel', false)->where('user_id', '!=', 1)->whereYear('created_at', 2020)->get();
$bookings = Booking::where('admin_status', '>=', 3)->where('term', 'like', 'x2_%')->where('is_cancel', false)->where('user_id', '!=', 1)->get();
$months = $bookings->groupBy(function($item) {
return $item->created_at->format('Y-m');
});