我正在设法了解laravel的可邮寄邮件及其呈现方式。我阅读了文档,但是对此一无所获。
我发布了可自定义的可邮寄组件,实时资源/视图/供应商/邮件/ html和markdown文件夹
我也有resources / views / emails / testing.blade.php
我正在按照文档中的说明使用markdown,它将使用默认模板,并且还将呈现文本版本
我本质上是想了解为什么面板在我有面板标签的地方无法渲染
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<style>
@media only screen and (max-width: 600px) {
.inner-body {
width: 100% !important;
}
.footer {
width: 100% !important;
}
}
@media only screen and (max-width: 500px) {
.button {
width: 100% !important;
}
}
</style>
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table class="content" width="100%" cellpadding="0" cellspacing="0">
{{ $header or '' }}
{{ $panel or '' }} <!-- Why can't I render it here???? -->
<!-- Email Body -->
<tr>
<td class="body" width="100%" cellpadding="0" cellspacing="0">
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0">
<!-- Body content -->
<tr>
<td class="content-cell">
{{ Illuminate\Mail\Markdown::parse($slot) }}
{{ $subcopy or '' }}
</td>
</tr>
</table>
</td>
</tr>
{{ $footer or '' }}
</table>
</td>
</tr>
</table>
</body>
</html>
和我的testing.blade.php
@component('mail::panel')
Some panel content
@endcomponent
@component('mail::message')
Welcome to the site {{$user['name']}}
Your registered email is {{$user['email']}} , Please click on the below link to verify your email account
@component('mail::subcopy')
super subcopy
@endcomponent
@component('mail::button', ['url' => url('/')])
My Button
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
面板似乎唯一呈现的方法是,如果我将其放在@component('mail :: message')中,但即使如此,它也不会呈现在上面指示的位置?
有人吗? 欢呼