where(['status' => 'normal', 'id' => ['in',explode(',',$data['lable_ids'] ?? '') ?? [-1]] ])->field(['lable_name'])->select(); return !empty($list) ? array_column($list,'lable_name') : []; } /** * 全局搜索 */ public function scopeNormal($query){ return $query->where('status','normal'); } }