如何自定义/更改通知邮件的标题徽标(laravel)

问题描述 投票:0回答:1

我不知道在哪里可以找到下面的header logo示例(平方):

enter image description here 我的内容代码:

public function toMail($notifiable)
{
    return (new MailMessage) 
        ->line('The introduction to the notification.'.$user->name)
        ->line('Hey Now hey now')
        ->action('Notification Action', route('register.select'))
        ->line('Thank you for using our application!');
}


EDITED: in email.blade.php:
@component('mail::message')
{{-- Greeting --}}
@if (! empty($greeting))
# {{ $greeting }}
@else
@if ($level === 'error')
# @lang('Whoops!')
@else
# @lang('Hello!')
@endif
@endif

{{-- Intro Lines --}}
@foreach ($introLines as $line)
{{ $line }}

@endforeach

... and so on, and so forth


I want to customize that logo header, my problem I can't find where exactly. Need your help Sirs.
laravel laravel-mail
1个回答
0
投票

您只需自定义电子邮件模板即可。

运行此命令:

php artisan vendor:publish --tag=laravel-notifications

之后你会在resources/views/vendor/notifications找到模板。


如果要自定义模板中使用的邮件组件:

php artisan vendor:publish --tag=laravel-mail

你会在resources/views/vendor/mail找到组件。你想要的是message.blade.phpheader.blade.php

© www.soinside.com 2019 - 2024. All rights reserved.