Laravel "universal to" in development vs production
I think this should work - it leaves config('mail.to')
as null
unless UNIVERSAL_TO
is set.
'to' => env('UNIVERSAL_TO', false) ? [
'address' => env('UNIVERSAL_TO'),
'name' => env('UNIVERSAL_TO_NAME')
] : null,