You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'app.admin_config' doesn't exist (SQL: select `name`, `value` from `admin_config`)
触发:
当在
AppServiceProvider
的 boot 中添加Config::load();
时如果数据库中无admin_config
表就会触发,此处对表进行了全读取。场景:
服务器上部署代码是先拉取代码再执行
php artisan migrate
等命令来安装初始化的,但是这个时候load
因为在boot
中,任何地方都会触发,所以连php artisan
都无法执行,形成了死循环。解决方案:
php artisan admin:import config
命令执行完成后再打开admin_config
表但以上三种方法均非良策,看代码是因为要压入系统配置函数所以直接初始化,有无更好的方法直接在包里改进?
The text was updated successfully, but these errors were encountered: