2
I have a class Foobar.php
that in it have a return []
with some items that are pointed out from .env
, in this format:
Foobar.php:
function decode_ifnot_null() {} ... // método que auxilia na obtenção de valores de arquivos
return [
"CONFIG_A" => env("CONFIG_A", true),
"CONFIG_B" => decode_ifnot_null(env("CONFIG_B")),
"CONFIG_C" => env("CONFIG_C", true),
];
In my .env, is like this:
CONFIG_A=the quick fox
CONFIG_B=C:\\users\\admin\\arquivo.json
CONFIG_C=jumps over the lazy dog
But when I call the method config("CONFIG_A")
, I get a null
. When I call the env("CONFIG_A")
, i get the quick fox
.
The archive Foobar.php is inside /config/
.
What am I doing wrong?
You love misspelling my name. Thanks anyway!
– CypherPotato
@Cypherpotato Cyberpotato is your pet BOT :)
– Guilherme Nascimento
Considerable haha
– CypherPotato