From d3e7b863daa0e5884b99756c166da7628a7aba4b Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Wed, 15 Apr 2020 19:41:01 +0300 Subject: [PATCH] minor changes made to make compatible with code structure --- app/Console/Commands/BillReminder.php | 3 ++- app/Console/Commands/InvoiceReminder.php | 3 ++- app/Events/Purchase/{BillReminding.php => BillReminded.php} | 2 +- app/Events/Sale/{InvoiceReminding.php => InvoiceReminded.php} | 2 +- ...ndingNotification.php => SendBillReminderNotification.php} | 2 +- ...ngNotification.php => SendInvoiceReminderNotification.php} | 2 +- app/Providers/Event.php | 4 ++-- 7 files changed, 10 insertions(+), 8 deletions(-) rename app/Events/Purchase/{BillReminding.php => BillReminded.php} (93%) rename app/Events/Sale/{InvoiceReminding.php => InvoiceReminded.php} (92%) rename app/Listeners/Purchase/{SendBillRemindingNotification.php => SendBillReminderNotification.php} (94%) rename app/Listeners/Sale/{SendInvoiceRemindingNotification.php => SendInvoiceReminderNotification.php} (95%) diff --git a/app/Console/Commands/BillReminder.php b/app/Console/Commands/BillReminder.php index 8727550f5..13caf2a93 100644 --- a/app/Console/Commands/BillReminder.php +++ b/app/Console/Commands/BillReminder.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Events\Purchase\BillReminded; use App\Models\Common\Company; use App\Models\Purchase\Bill; use App\Utilities\Overrider; @@ -77,7 +78,7 @@ class BillReminder extends Command $bills = Bill::with('contact')->accrued()->notPaid()->due($date)->cursor(); foreach ($bills as $bill) { - event(new \App\Events\Purchase\BillReminding($bill)); + event(new BillReminded($bill)); } } diff --git a/app/Console/Commands/InvoiceReminder.php b/app/Console/Commands/InvoiceReminder.php index d2b9879a6..9f6d6af7e 100644 --- a/app/Console/Commands/InvoiceReminder.php +++ b/app/Console/Commands/InvoiceReminder.php @@ -2,6 +2,7 @@ namespace App\Console\Commands; +use App\Events\Sale\InvoiceReminded; use App\Models\Common\Company; use App\Models\Sale\Invoice; use App\Utilities\Overrider; @@ -77,7 +78,7 @@ class InvoiceReminder extends Command $invoices = Invoice::with('contact')->accrued()->notPaid()->due($date)->cursor(); foreach ($invoices as $invoice) { - event(new \App\Events\Sale\InvoiceReminding($invoice)); + event(new InvoiceReminded($invoice)); } } } diff --git a/app/Events/Purchase/BillReminding.php b/app/Events/Purchase/BillReminded.php similarity index 93% rename from app/Events/Purchase/BillReminding.php rename to app/Events/Purchase/BillReminded.php index ee6d931c8..efbfcf505 100644 --- a/app/Events/Purchase/BillReminding.php +++ b/app/Events/Purchase/BillReminded.php @@ -4,7 +4,7 @@ namespace App\Events\Purchase; use Illuminate\Queue\SerializesModels; -class BillReminding +class BillReminded { use SerializesModels; diff --git a/app/Events/Sale/InvoiceReminding.php b/app/Events/Sale/InvoiceReminded.php similarity index 92% rename from app/Events/Sale/InvoiceReminding.php rename to app/Events/Sale/InvoiceReminded.php index 76e7bdfb0..fe6bc87ec 100644 --- a/app/Events/Sale/InvoiceReminding.php +++ b/app/Events/Sale/InvoiceReminded.php @@ -4,7 +4,7 @@ namespace App\Events\Sale; use Illuminate\Queue\SerializesModels; -class InvoiceReminding +class InvoiceReminded { use SerializesModels; diff --git a/app/Listeners/Purchase/SendBillRemindingNotification.php b/app/Listeners/Purchase/SendBillReminderNotification.php similarity index 94% rename from app/Listeners/Purchase/SendBillRemindingNotification.php rename to app/Listeners/Purchase/SendBillReminderNotification.php index 51f4cb60e..1554b5c9b 100644 --- a/app/Listeners/Purchase/SendBillRemindingNotification.php +++ b/app/Listeners/Purchase/SendBillReminderNotification.php @@ -5,7 +5,7 @@ namespace App\Listeners\Purchase; use App\Events\Purchase\BillReminding as Event; use App\Notifications\Purchase\Bill as Notification; -class SendBillRemindingNotification +class SendBillReminderNotification { /** * Handle the event. diff --git a/app/Listeners/Sale/SendInvoiceRemindingNotification.php b/app/Listeners/Sale/SendInvoiceReminderNotification.php similarity index 95% rename from app/Listeners/Sale/SendInvoiceRemindingNotification.php rename to app/Listeners/Sale/SendInvoiceReminderNotification.php index ba1ba99fc..b22976ae7 100644 --- a/app/Listeners/Sale/SendInvoiceRemindingNotification.php +++ b/app/Listeners/Sale/SendInvoiceReminderNotification.php @@ -5,7 +5,7 @@ namespace App\Listeners\Sale; use App\Events\Sale\InvoiceReminding as Event; use App\Notifications\Sale\Invoice as Notification; -class SendInvoiceRemindingNotification +class SendInvoiceReminderNotification { /** * Handle the event. diff --git a/app/Providers/Event.php b/app/Providers/Event.php index 780fbb3a5..7161c02e2 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -40,7 +40,7 @@ class Event extends Provider 'App\Listeners\Purchase\SendBillRecurringNotification', ], 'App\Events\Purchase\BillReminding' => [ - 'App\Listeners\Purchase\SendBillRemindingNotification', + 'App\Listeners\Purchase\SendBillReminderNotification', ], 'App\Events\Sale\PaymentReceived' => [ 'App\Listeners\Sale\CreateInvoiceTransaction', @@ -63,7 +63,7 @@ class Event extends Provider 'App\Listeners\Sale\SendInvoiceRecurringNotification', ], 'App\Events\Sale\InvoiceReminding' => [ - 'App\Listeners\Sale\SendInvoiceRemindingNotification', + 'App\Listeners\Sale\SendInvoiceReminderNotification', ], 'App\Events\Menu\AdminCreated' => [ 'App\Listeners\Menu\AddAdminItems',