userOauth = $userOauth; } /** * 绑定用户 * @param $id * @param $userId 用户ID */ public function bind($id, $userId) { $userOauth = $this->userOauth->find($id); if(!$userOauth){ return false; } $userOauth->user_id = $userId; return $userOauth->save(); } }