The env() helper function not work in /routes/web.php, when I call this function, it return me a value of null for any parameter that I pass him. In this case env( APP_URL )
my file .env
APP_URL=http://test.dev
/routes/web.php
dd( env( 'APP_URL' ) ); // Return null
I hope you can help me, thanks and greetings :D (Y)
You should only ever use the env function inside config files.
I understand, then, do I have no other alternative, for access to the value of APP_URL?
@Caxvalencia, config('app.url')
Great :D !! Thanks
Run php artisan config:clear
Most helpful comment
@Caxvalencia,
config('app.url')