jeudi 13 décembre 2018

How do you customize variables in Laravel default emails?

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:


@if (! empty($greeting))
# 
@else
@if ($level === 'error')
# @lang('Whoops!')
@else
# @lang('Hello!')
@endif
@endif


@if (! empty($salutation))

@else
@lang('Regards'),<br>
@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?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire