所以我試圖從關聯數組中的數據準備一個雄辯的查詢:/* This works */$this ->where("email", "[email protected]") ->where("is_active", 1) ->update($params);/* This doesn't work */$where = [ 'email' => "[email protected]", 'is_active' => 1];foreach ($where as $k => $v) { $this->where("{$k}", "{$v}");}$this->update($params);我想念什么嗎?任何幫助表示贊賞。編輯:查詢不會更新數據庫中的實體。Ubuntu 18.10(Cosmic Cuttlefish):4.18.0-17-通用x86_64位:64桌面:Gnome 3.30.2 Laradock,Laravel 5.8。
- 2 回答
- 0 關注
- 122 瀏覽
添加回答
舉報
0/150
提交
取消