💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
一下使用无效的 ``` $where[] = ['id','in',[1,2]]; $where[] = ['in'=>['tn_user_base.id'=>$medical_number_ids]]; $where[] = ['in'=>['tn_user_base.id'=>$medical_number_ids]]; ``` **外部定义whereIn的用法** 1,表达式: ``` $whereOr[] = [Db::Raw("id in (" . join(',',[1,2,3]) . ')'),1]; ``` 输出:id in (1,2,3) = 1 破坏索引 2,闭包: ``` if (!empty($id)) { $where[] = [ function ($query) use ($id) { $query->whereIn('id', $id); }, ]; ```