close #363 Fixed: Sending "pay now" button to customer not able to login

This commit is contained in:
cuneytsenturk 2018-05-28 16:11:56 +03:00
parent 630b354327
commit 0590e2ed91

View File

@ -47,8 +47,7 @@ class Invoice extends Notification
public function toMail($notifiable)
{
$message = (new MailMessage)
->line(trans('invoices.notification.message', ['amount' => money($this->invoice->amount, $this->invoice->currency_code, true), 'customer' => $this->invoice->customer_name]))
->action(trans('invoices.notification.button'), url('customers/invoices', $this->invoice->id, true));
->line(trans('invoices.notification.message', ['amount' => money($this->invoice->amount, $this->invoice->currency_code, true), 'customer' => $this->invoice->customer_name]));
// Override per company as Laravel doesn't read config
$message->from(config('mail.from.address'), config('mail.from.name'));
@ -60,6 +59,10 @@ class Invoice extends Notification
]);
}
if ($this->invoice->customer->user) {
$message->action(trans('invoices.notification.button'), url('customers/invoices', $this->invoice->id, true));
}
return $message;
}