I followed this answer to publish the default email templates in my application with:
php artisan vendor:publish --tag=laravel-notifications
php artisan vendor:publish --tag=laravel-mail
This works great, but clearly there is some configuration options, such as:
{{-- Greeting --}}
@if (! empty($greeting))
# {{ $greeting }}
@else
@if ($level === 'error')
# @lang('Whoops!')
@else
# @lang('Hello!')
@endif
@endif
{{-- Salutation --}}
@if (! empty($salutation))
{{ $salutation }}
@else
@lang('Regards'),<br>{{ config('app.name') }}
@endif
Right now my emails are sending "Hello!" and "Regards" from the else section but clearly there is a way to set these defaults for email templates using variables. How do I set the $greeting
and $salutation
variables when sending emails?
@lang('Regards')
is stored. It isn't exposed in my code base currently. It may be helpful if anyone can add that info as a comment or additional answer here. I found this question by Googling@lang('Regards')
with double-quotes around it. I'd like to add something like@lang('Team')
adjacent to the Regards definition. – Chancroidresources/lang
is a folder location, and a person may be able to add any customizations there. I just haven't learned enough about that yet to say how to do that. – Chancroid