diff --git a/app/Modules/Bitrix/Http/Controllers/ContractUpdateController.php b/app/Modules/Bitrix/Http/Controllers/ContractUpdateController.php index 73daa29..7810b3e 100644 --- a/app/Modules/Bitrix/Http/Controllers/ContractUpdateController.php +++ b/app/Modules/Bitrix/Http/Controllers/ContractUpdateController.php @@ -9,6 +9,7 @@ use Modules\Contracts\Models\Contract; use Modules\Contracts\Models\ContractStatus; use App\Notifications\ContractUpdated; +use App\Notifications\Deal\ContractUpdated as ContractUpdatedForDeal; class ContractUpdateController { public function __invoke(Deal $deal, Request $request) @@ -44,7 +45,7 @@ public function __invoke(Deal $deal, Request $request) $contract->add_info = $addInfo; $contract->save(); $agent = $deal->agent; - $deal->notify(new ContractUpdated($deal->contract)); + $deal->notify(new ContractUpdatedForDeal($deal->contract)); $agent->user->notify(new ContractUpdated($deal->contract)); return true; } diff --git a/app/Notifications/Deal/ContractUpdated.php b/app/Notifications/Deal/ContractUpdated.php index 567cdd0..fe76842 100644 --- a/app/Notifications/Deal/ContractUpdated.php +++ b/app/Notifications/Deal/ContractUpdated.php @@ -7,6 +7,7 @@ use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; +use Modules\Contracts\Models\Contract; use App\Models\Deal\Deal; use App\Models\Deal\DealStatus; @@ -17,7 +18,7 @@ class ContractUpdated extends Notification /** * Create a new notification instance. */ - public function __construct() + public function __construct(Contract $contract) { }