7

I have no idea where could I found the header logo example below(squared):

enter image description here

My content code:

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.
schutte
  • 1,949
  • 7
  • 25
  • 45

2 Answers2

23

You just have to customize mail templates.

Run this command:

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

After that you'll find templates in resources/views/vendor/notifications.


If you want to customize mail components used in templates:

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

You'll find components in resources/views/vendor/mail. The ones you want are message.blade.php and header.blade.php.

Styx
  • 9,863
  • 8
  • 43
  • 53
4

It only shows the Laravel logo if the APP_NAME in the .env is set as "Laravel".

So once you change this setting it will omit the default logo. if you want to change it to display something else you can publish the mail components as other answers showed and customize it.