4 years ago

$config->set not working?

Posted 4 years ago by SergioGregorutti

Hi all,

I'm using the Config facade to set and use global variables on my site and it's working fine, but I have a problem.

On the AppServiceProvider.php (boot method) Im doing this:

$config->set('', 'Mundo Hurlingham');

And then on a controller Im trying to overwrite the value doing this:

$config->set('', 'Test');
echo "Result: ".config('').'.';

But the problem is that the config('') result is always "Mundo Hurlingham". And then I use the value on a view an is still the old value.

How can I overwrite the value? Is there a way to do this? Maybe clearing the cache or something like that?

Thanks in advance!

Please sign in or create an account to participate in this conversation.