From 770ad182331bd0fa6d125e62eb9436804ecef61b Mon Sep 17 00:00:00 2001 From: didier Date: Wed, 16 Oct 2024 06:53:02 +0200 Subject: [PATCH] fix default message --- app/Console/Commands/SendNotifications.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/SendNotifications.php b/app/Console/Commands/SendNotifications.php index f8b8b04..850a49e 100644 --- a/app/Console/Commands/SendNotifications.php +++ b/app/Console/Commands/SendNotifications.php @@ -102,8 +102,13 @@ public function handle() $to_email = $user->email; $subject = config('deming.notification.mail-subject'); - // Apply message model - $message = str_replace("%table%",$txt,config('deming.notification.mail-content')); + // Get message model + $message = config('deming.notification.mail-content'); + if (($message==null)||(strlen($message)==0)) + $message = trans('cruds.config.notifications.message_default_content'); + + // Replace %table% in message model + $message = str_replace("%table%",$txt,$message); // Send mail if (mail(