__('State 0'), '1' => __('State 1'), '2' => __('State 2'), '3' => __('State 3')]; } public function getStateTextAttr($value, $data) { $value = $value ? $value : (isset($data['state']) ? $data['state'] : ''); $list = $this->getStateList(); return isset($list[$value]) ? $list[$value] : ''; } public function wanlshopfind() { return $this->belongsTo('app\admin\model\wanlshop\Find', 'id', 'live_id', [], 'LEFT')->setEagerlyType(0); } public function wanlshopshop() { return $this->belongsTo('app\admin\model\wanlshop\Shop', 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0); } }