Laravel comes with some basic config files available in config directory.
which each file is basically an associated array.
now, I want to change the structure of config/mail.php from
'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
to
'from' => [
'noreply' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'Example'),
]
],
so I can have several emails with differnt name.
My question is generic here.
What are(if any) disadvantages of modifying structure of the config files?
Is it possible to be troublesome between LTS upgrades?
You shouldn't modify email.form data because Laravel uses the data:
You may specify a global
fromaddress in yourconfig/mail.phpconfiguration file. This address will be used if no otherfromaddress is specified within the mailable class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With