Laravel-在降价邮件中使用@foreach [英] Laravel- use @foreach in markdown mail
本文介绍了Laravel-在降价邮件中使用@foreach的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在markdown模板中使用@foreach
循环发送邮件.
I am trying to use @foreach
loop inside markdown template for sending mails.
虽然在@foreach中使用HTML标记,但无法正确呈现
While using HTML tags inside @foreach, it is not rendered properly
@component('mail::message')
These are the latest contents in our website
@foreach($results as $type => $result)
<h4>{{ $result['name'] }}</h4>
@endforeach
Thanks,<br>
{{ config('app.name') }}
@endcomponent
在收到的邮件中,<h4>
标签将显示为
In the received mail, the <h4>
tag will be displayed as,
<h4>Article</h4>
将Markdown放入@foreach
循环中时未得到处理.但是,将其放置在@foreach
循环之外时会对其进行处理.
Markdown is not getting processed when it's placed inside @foreach
loop. But it's processed when placed outside @foreach
loop.
任何帮助将不胜感激.谢谢.
Any help will be much appreciated. Thanks.
推荐答案
查看全文