From 59f537ccbae4d003e3f887d47d1c929d69d377eb Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 12 Nov 2020 13:14:44 +0800 Subject: [PATCH] test sending booking do to email --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 74ade876..825616f6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -47,7 +47,7 @@ Route::get('/old-invoices', function(){ })->name('invoice.old'); Route::get('/approved-today', function(){ - $approvedInvoices = InvoiceStatuses::where('status', 'approve')->whereDate('created_at', Carbon::today())->groupBy('invoice_id')->get(); + $approvedInvoices = InvoiceStatuses::where('status', 'approve')->whereDate('created_at', Carbon::today())->distinct('invoice_id')->get(); echo count($approvedInvoices).'



'; foreach($approvedInvoices as $approved){ echo $approved->invoice->booking->id.'
';