I added this variable to .env file
STRIPE_SECRET=a12345
I would like to dump the variable using routes/web.php
&
if you have
STRIPE="a12345" this in .env file or if you any change in .env file or config file then you fallow these steps
one more thing write the variable value in comma's like STRIPE="a12345"
First run these commands
1. php artisan config:clear
2. php artisan cache:clear
3. composer dump-autoload
and finally used this command to get variable
dd(env('STRIPE'));
this working for me
and also 1 stupid suggestion: restart server
I have add all possible solution