diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index c198c3de..4b515e97 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -40,7 +40,7 @@ class Kernel extends ConsoleKernel $bookings[] = $approved->invoice->booking->id; } foreach ($bookings as $id) { - $do = (new InvoiceController())->generateSupplierDo($id); + $do = app(InvoiceController::class)->generateSupplierDo($id); $zip->addFromString('do_'.Carbon::today()->format('Y_m_d').'_'.$id.'.pdf', $do->Output('do.pdf', 'S')); }