'integer', 'group_id' => 'integer', 'user_id' => 'integer', 'group_owner' => 'integer', 'status' => 'integer', 'created_at' => 'datetime' ]; /** * 获取聊天群成员ID * * @param int $group_id 群聊ID * @return mixed */ public static function getGroupMemberIds(int $group_id) { return self::where('group_id', $group_id)->where('status', 0)->pluck('user_id')->toArray(); } /** * 获取用户的群名片 * * @param int $user_id 用户ID * @param int $group_id 群ID * @return mixed */ public static function visitCard(int $user_id, int $group_id) { return self::where('group_id', $group_id)->where('user_id', $user_id)->value('visit_card'); } }