Run config clear on browser

你。 提交于 2019-12-11 06:15:32

问题


I need to run php artisan config:clear on my app that is online, the only issue is that I have only the FTP credentials and DB, and not the SSH to run on the terminal, how can I run this command without the terminal? Already tried looking on the forum and didn't found any question related with my issue but didn't found any answer for it.


回答1:


You can call the artisan command from anywhere in your PHP code block.

$exitCode = Artisan::call('config:clear');

More info can be found here https://laravel.com/docs/5.4/artisan#programmatically-executing-commands




回答2:


That artisan command is only a helper to let you clear out the cached files.

You should be able to clear the config cache yourself, by removing the file config.php from folder /bootstrap/cache/ in your project.



来源:https://stackoverflow.com/questions/44097969/run-config-clear-on-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!