__('Status 0'), '1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function type() { return $this->belongsTo('app\admin\model\qingdong\product\Type', 'gqydhcgi', 'id', [], 'LEFT')->setEagerlyType(0); } }