обновлено уведомление о договоре
This commit is contained in:
parent
8918309dbf
commit
fd7a9bb86d
@ -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;
|
||||
}
|
||||
|
||||
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user