I need to get address and name variables on my Mail.php config:
'from' => ['address' => env('MAIL_USERNAME'), 'name' => env('MAIL_NAME')],
I tried this:
Config::get('mail.from.*.name');
Config::get('mail.from["name"]');
But it doesn't work, what do I do to get them? Thanks.
I think you can directly access MAIL_NAME from .env
env('MAIL_NAME');
OR
Config::get('mail.from.name');
Hope this work for you !!!
this is the shortest method i know using helper methods :
config('mail.from.name')
or you can access it using your .env file with env('MAIL_NAME')
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