From 7d416d1175433e79edc1ff5a2308ea84daae68f6 Mon Sep 17 00:00:00 2001 From: snipe Date: Sun, 5 May 2019 19:57:23 -0400 Subject: [PATCH] Fixed :threshold placeholder --- app/Notifications/SendUpcomingAuditNotification.php | 4 +++- .../views/notifications/markdown/upcoming-audits.blade.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Notifications/SendUpcomingAuditNotification.php b/app/Notifications/SendUpcomingAuditNotification.php index eb68df6546..0aaf11cda5 100644 --- a/app/Notifications/SendUpcomingAuditNotification.php +++ b/app/Notifications/SendUpcomingAuditNotification.php @@ -20,6 +20,7 @@ class SendUpcomingAuditNotification extends Notification public function __construct($params, $threshold) { $this->assets = $params; + $this->threshold = $threshold; } /** @@ -44,8 +45,9 @@ class SendUpcomingAuditNotification extends Notification $message = (new MailMessage)->markdown('notifications.markdown.upcoming-audits', [ 'assets' => $this->assets, + 'threshold' => $this->threshold, ]) - ->subject(trans_choice('mail.upcoming-audits', $this->assets->count(), ['count' => $this->assets->count()])); + ->subject(trans_choice('mail.upcoming-audits', $this->assets->count(), ['count' => $this->assets->count(), 'threshold' => $this->threshold])); return $message; } diff --git a/resources/views/notifications/markdown/upcoming-audits.blade.php b/resources/views/notifications/markdown/upcoming-audits.blade.php index 1d633a6936..5fd269d1a5 100644 --- a/resources/views/notifications/markdown/upcoming-audits.blade.php +++ b/resources/views/notifications/markdown/upcoming-audits.blade.php @@ -1,6 +1,6 @@ @component('mail::message') -### {{ trans_choice('mail.upcoming-audits', $assets->count(), ['count' => $assets->count()]) }} +### {{ trans_choice('mail.upcoming-audits', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]) }} @component('mail::table') | |{{ trans('mail.name') }}|{{ trans('general.last_audit') }}|{{ trans('general.next_audit_date') }}|{{ trans('mail.Days') }}|{{ trans('mail.supplier') }} | {{ trans('mail.assigned_to') }}