2017-08-29 42 views
0

嗨我想在我的Laravel应用程序中使用MailMessage函数。我的问题很简单。如何在接收来自应用程序的电子邮件时编辑页眉和页脚?下面是这张照片。Laravel 5.4邮件消息如何编辑页眉和页脚

enter image description here

我想头Laravel从我的应用程序的名称,并你好$用户>名称和问候,我的应用程序的名字也和下方的应用程序名称也页脚的Hello改变。

enter image description here

我试图改变`

资源/视图/供应商/邮件/降价/ message.blade.php

要:

@component('mail::layout') 
    {{-- Header --}} 
    @slot('header') 
     @component('mail::header', ['url' => config('app.url')]) 
      CCTV App 
     @endcomponent 
    @endslot 

    {{-- Body --}} 
    {{ $slot }} 

    {{-- Subcopy --}} 
    @isset($subcopy) 
     @slot('subcopy') 
      @component('mail::subcopy') 
       CCTV Team 
      @endcomponent 
     @endslot 
    @endisset 

    {{-- Footer --}} 
    @slot('footer') 
     @component('mail::footer') 
      © {{ date('Y') }} CCV3. All rights reserved. 
     @endcomponent 
    @endslot 
@endcomponent 

但我无法发送重设密码请求 如果有人能帮助我,我会非常感激。 在此先感谢。

`

回答

1

我已经弄明白只是改变了ENV文件的名称到您的应用程序名称,而不是laravel。这是下面的示例。

APP_NAME=Laravel 

将其更改为

APP_NAME=YOUR_APP_NAME 

也有编辑您的邮件模板的一种方式。 只要到资源/视图/供应商/通知/ email.blade.php ,你也可以编辑短信到您的邮件只是去资源/视图/供应商/降价/ message.blade.php