gpt4 book ai didi

laravel - Laravel 邮件模板 $slot 变量定义在哪里

转载 作者:行者123 更新时间:2023-12-05 06:50:40 24 4
gpt4 key购买 nike

Laravel 邮件模板中的 $slot 变量在哪里定义?

<tr>
<td class="header">
<a href="{{ $url }}" style="display: inline-block;">
@if (trim($slot) === 'Laravel')
<img src="https://api.foo.com/foo-logo.svg" class="logo" alt="Laravel Logo">
@else
{{ $slot }}
@endif
</a>
</td>
</tr>

我通过以下方式使用它:

    public function toMail($notifiable)
{
return (new MailMessage)
->subject(__('Reset Password Notification'))
->line(__('You are receiving this email because we received a password reset request for your account.'))
->action(__('Reset Password'), $this->url)
->line(__('This password reset link will expire in :count minutes.', ['count' => 60]))
->line(__('If you did not request a password reset, no further action is required.'));
}

最佳答案

所有邮件模板都存储在resources/views/email。也许在此目录中搜索短语 $slot

同时检查您的可邮寄类 (MailMessage),其中 ->view('email.contact-form') 方法指向……

就我而言,我有:

return $this
->from(config('mail.contact.address'))
->replyTo($senderEmail, $senderName)
->view('email.contact-form')
->with($data);

邮件模板是:src/resources/views/email/contact-form.blade.php

关于laravel - Laravel 邮件模板 $slot 变量定义在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66353083/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com