__('gold'), 'jewel' => __('jewel')]; } public function getMoneyTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['money_type']) ? $data['money_type'] : ''); $list = $this->getMoneyTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }