where('id', $id) ->first(); if(empty($info)){ return false; } return self::where('task_id', $info->task_id)->where('month', $info->month)->update(['enable'=>0]); } public static function delByCaId($id) { $info = OrderMcn::select('task_id', 'original_month') ->where('id', $id) ->first(); if(empty($info)){ return false; } return self::where('task_id', $info->task_id)->where('month', $info->original_month)->update(['enable'=>0]); } }