我尝试插入代码
$info = DB::table('role_user')->where('user_id', '=',$current)
->where('role_id', '=',$id)->get();
插入错误
$response = $info->insert(array('active' => 1));
您应该运行更新查询:
$response = DB::table('role_user')
->where('user_id', $current)
->where('role_id', $id)
->update(array('active' => 1));
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句