From 8e1edc6eb549675e5307f7bbb879bcd3a3d17bc2 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sat, 5 Dec 2020 11:04:41 +0800 Subject: [PATCH] x1 and x2 reports --- routes/web.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/routes/web.php b/routes/web.php index a77ab090..aa484f86 100644 --- a/routes/web.php +++ b/routes/web.php @@ -20,7 +20,20 @@ use Illuminate\Support\Facades\File; 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', 'x1'); + $months = $bookings->groupBy(function($item) { + return $item->created_at->format('Y-m-d'); + }); + dd($months); + +}); +Route::get('/report/x2', function(){ + $bookings = Booking::where('admin_status', '>=', 3)->where('term', 'x2'); + + +}); Route::get('/po-approval', function(){ $approvedInvoices = InvoiceStatuses::where('status', 'approve')->distinct()->get(['invoice_id'])->pluck('invoice_id'); $pendingChangeInvoices = InvoiceStatuses::where('status', 'request_change')->distinct()->get(['invoice_id'])->pluck('invoice_id');