I have applied Laravel Notifications email template to send email when a comment is applied. Here the code:
$mailmessage= (new MailMessage)
->line( __('messages.hello').' '.$this->arr['user'].',')
->line($this->arr['created_by'].' '.__('messages.comment_'.$this->arr['function_name'].'_you_owner',['task_name'=>$this->arr['function_title']] ))
->line(new HtmlString('<div class="lightgreylayer">'.$this->arr['comment'].'<div>'))
->action(__('titles.view_'.$this->arr['function_name']), url($link));
All works fine except for a class lightgreylayer
I applied to a single line. the class is applied, but to all the following elements, not only to the line I applied the HtmlString
.
I already change the email.blade.php from {{ $line }}
to {!! $line !!}
.
Any solution to apply a class only to my line?
thanks!
For knowledge of the other users, I found solution to isolate the css class application to a single line(), by applying an additional div
:
->line(new HtmlString('<div><div class="lightgreylayer">'.$this->arr['comment'].'</div><div>'))