255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'parent_id' => 'Parent ID', 'citycode' => 'Citycode', 'adcode' => 'Adcode', 'name' => 'Name', 'lng' => '经度', 'lat' => '纬度', 'level' => 'Level', ]; } public function getCity() { return $this->hasMany(District::className(), ['parent_id'=>'id'])->where(['level'=>'city']); } }