__('Star 1'),'2' => __('Star 2'),'3' => __('Star 3'),'4' => __('Star 4'),'5' => __('Star 5')]; } public function getCreateTimeTextAttr($value, $data) { $value = $value ? $value : $data['create_time']; return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getStarTextAttr($value, $data) { $value = $value ? $value : $data['star']; $list = $this->getStarList(); return isset($list[$value]) ? $list[$value] : ''; } protected function setCreateTimeAttr($value) { return $value && !is_numeric($value) ? strtotime($value) : $value; } }