', 0]])->column('root_id'); foreach ($root_ids as $v) { $haveLabel = DailyWechatLabel::where(['root_id'=>$v , 'show'=>1])->count(); if(empty($haveLabel)) DailyWechatLabel::create(['root_id'=>$v , 'label_name'=>'其它' , 'show'=>1]); } } }