__('Vip_type 1'), '2' => __('Vip_type 2')]; } public function getVipTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['vip_type']) ? $data['vip_type'] : ''); $list = $this->getVipTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }