addBehavior( new SoftDelete([ 'field' => 'deleted', 'value' => 1, ]) ); } public function beforeSave() { if (empty($this->create_time)) { $this->create_time = time(); } $this->update_time = time(); } public function fullAddress() { return implode(' ', [ $this->add_province, $this->add_city, $this->add_county, $this->add_other, ]); } }