__('Wallettype 1'), '2' => __('Wallettype 2')]; } public function getWallettypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['wallettype']) ? $data['wallettype'] : ''); $list = $this->getWallettypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function userto() { return $this->belongsTo('User', 'user_to_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function gift() { return $this->belongsTo('Gift', 'gift_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function topicdongtai() { return $this->belongsTo('Topicdongtai', 'dt_id', 'id', [], 'LEFT')->setEagerlyType(0); } }