From ee34dec24bdf8d55255969f92783612ccdc7237a Mon Sep 17 00:00:00 2001 From: denisdulici Date: Thu, 7 Dec 2017 12:40:58 +0300 Subject: [PATCH] fixed #135 --- app/Console/Commands/InvoiceReminder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/InvoiceReminder.php b/app/Console/Commands/InvoiceReminder.php index c0f342289..e3fcb75d9 100644 --- a/app/Console/Commands/InvoiceReminder.php +++ b/app/Console/Commands/InvoiceReminder.php @@ -69,7 +69,9 @@ class InvoiceReminder extends Command foreach ($invoices as $invoice) { // Notify the customer - $invoice->customer->notify(new Notification($invoice)); + if ($invoice->customer) { + $invoice->customer->notify(new Notification($invoice)); + } // Notify all users assigned to this company foreach ($company->users as $user) {