Laravel 5.6 Uncaught RuntimeException: A facade root has not been set. in vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:218

谁都会走 提交于 2019-12-02 07:52:08

After trying a lot, I realized this was an issue due to SELinux in force in my system. SELinux prevented apache from writing to required files.

$ /usr/sbin/getenforce
Enforcing

I disabled SELinux to confirm this doubt and it worked properly once SELinux was disabled. So I just needed to set proper permission for my project, so SELinux can allow apache to write to necessary files.

$sudo chcon -t httpd_sys_rw_content_t /path/to/my/laravel/project/dir -R

I hope this will help to those who are facing same issue.

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