How to clear config cache data from route in laravel 5.5
I have a situation where i need to clear my config cache data from my project, i don't have access to server to run commands, so i want to run artisan commands from route, i kept clear cache in route its working fine but not working for config:cache from route, below is my code
Route::get('cache_config', function () {
\Artisan::call('config:cache');
dd("Config cache is cleared");
});
Can anyone help me how to do this, why its not working, its not clear my config cache data
Nakov config:cache not clearing my config cache data, i tried from command line, but config:cache clearing my config cache data. In documentation they told to use these two commands to clear config cache
Thank you @towhid, but i want to run commands from route as i mentioned in my code, i dont have permission to run commands from server, all commands working properly from route but config:cache command not working
Hi Sinnbeck, Artisan::call('config:clear'); not working, actually i want to change my env file values without restarting the server, for that i am doing these things, I kept env values in app.php and calling them into my controller, so i want to clear config cache to reflect those values in my controller. Is there any other way to achieve this