This commit is contained in:
denisdulici 2018-02-25 19:00:31 +03:00
parent 85e8e8ef00
commit 9439188392
3 changed files with 15 additions and 2 deletions

View File

@ -46,9 +46,14 @@ class Bill extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
$message = (new MailMessage)
->line('You are receiving this email because you have an upcoming ' . money($this->bill->amount, $this->bill->currency_code, true) . ' bill to ' . $this->bill->vendor_name . ' vendor.')
->action('Add Payment', url('expenses/bills', $this->bill->id, true));
// Override per company as Laravel doesn't read config
$message->from(config('mail.from.address'), config('mail.from.name'));
return $message;
}
/**

View File

@ -50,6 +50,9 @@ class Invoice extends Notification
->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));
// Override per company as Laravel doesn't read config
$message->from(config('mail.from.address'), config('mail.from.name'));
// Attach the PDF file if available
if (isset($this->invoice->pdf_path)) {
$message->attach($this->invoice->pdf_path, [

View File

@ -43,9 +43,14 @@ class Item extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
$message = (new MailMessage)
->line(trans('items.notification.message', ['name' => $this->item->name]))
->action(trans('items.notification.button'), url('items/items', $this->item->id, true));
// Override per company as Laravel doesn't read config
$message->from(config('mail.from.address'), config('mail.from.name'));
return $message;
}
/**