amount = $amount; $this->sn = $sn; } public function via($notifiable) { return sysConfig('payment_received_notification'); } public function toMail($notifiable) { return (new MailMessage) ->line(__('Payment for #:sn has been received! Total amount: ¥:amount.', ['sn' => $this->sn, 'amount' => $this->amount])) ->action(__('Invoice Detail'), route('invoiceInfo', $this->sn)); } public function toDataBase($notifiable) { return [ 'sn' => $this->sn, 'amount' => $this->amount, ]; } }