destroy操作丢失表前缀

浏览:342 发布日期:2018/09/07 分类:ThinkPHP5专区

create,save操作均正常,destroy丢失了表前缀,为什么,delete又不会触发event,
虽然官方为了更灵活没有加表前缀,这里设置表前缀
$this->setTable(Config('database.prefix').$this->table);
//下面这个设置是解决destroy表前缀丢失问题
$this->table = Config('database.prefix').$this->table;
最佳答案
评论( 相关
后面还有条评论,点击查看>>