Laravel has a .env file that contains various variables. Is there a way to get all the variables in one line of PHP code? I don't want to write
echo env('APP_DEBUG')
echo env('APP_URL')
etc...
I have tried
env("*")
env("*")
but none works.
This should work:
$_ENV; // gives all env variables.
To get a single env variable:
$_ENV['VARIABLE'];
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