Add Notification class to DocumentReminded event

This commit is contained in:
Burak Çakırel
2020-12-25 22:30:59 +03:00
parent 2d023873cc
commit ec7511a8bc
6 changed files with 22 additions and 11 deletions

View File

@ -5,6 +5,7 @@ namespace App\Console\Commands;
use App\Events\Document\DocumentReminded;
use App\Models\Common\Company;
use App\Models\Document\Document;
use App\Notifications\Purchase\Bill as Notification;
use App\Utilities\Overrider;
use Date;
use Illuminate\Console\Command;
@ -84,7 +85,7 @@ class BillReminder extends Command
foreach ($bills as $bill) {
try {
event(new DocumentReminded($bill));
event(new DocumentReminded($bill, Notification::class));
} catch (\Exception | \Throwable | \Swift_RfcComplianceException | \Illuminate\Database\QueryException $e) {
$this->error($e->getMessage());

View File

@ -5,6 +5,7 @@ namespace App\Console\Commands;
use App\Events\Document\DocumentReminded;
use App\Models\Common\Company;
use App\Models\Document\Document;
use App\Notifications\Sale\Invoice as Notification;
use App\Utilities\Overrider;
use Date;
use Illuminate\Console\Command;
@ -84,7 +85,7 @@ class InvoiceReminder extends Command
foreach ($invoices as $invoice) {
try {
event(new DocumentReminded($invoice));
event(new DocumentReminded($invoice, Notification::class));
} catch (\Exception | \Throwable | \Swift_RfcComplianceException | \Illuminate\Database\QueryException $e) {
$this->error($e->getMessage());