__('Status unpaid'), 'paid' => __('Status paid'), 'refund' => __('Status refund')]; } public function getPaidTimeTextAttr($value, $data) { $value = $value ?: ($data['paid_time'] ?? ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } protected function setPaidTimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } }