/** * 获取地址对象 */ public function getAddress() { if ($this->getIsNewRecord()) { return []; } $data = Address::findOne($this->getAttribute('addid')); return $data; }
public function show() { return Address::find()->asArray()->all(); }