この辺を見ても、やりたい方法が出てこなかったので、
一応書いておく。
https://readouble.com/laravel/5.7/ja/configuration.html
https://yaba-blog.com/laravel-env/
https://hiroto-k.hatenablog.com/entry/2018/03/28/213000
【config/services.php】
<?php
return [
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
];
【コントローラ】
$aryConfig = config( 'services.mailgun' );
$env_no_mailgun_domain = aryConfig[ 'domain' ];
キャッシュのクリアも忘れずに
https://qiita.com/Ping/items/10ada8d069e13d729701
php artisan config:cache