Hi,
when I would get a variables from .env file using env() function, always returns null. I tried cache:clear, config:cache, finally i change in correct php.ini value from variables_order = "GPCS" to variables_order = "EGPCS". From this moment returns $_ENV array of data, but not include data from .env file.
I could't get data from .env anyway. Can anyone help me?
Thanks, have a good day!
You need to insert the key in the method, or it only returns an array.
env('KEY'); // **local**
In your .env file:
KEY=local
...
Added Docs Link
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community