hasOne(WechatPaymentRecord::class, 'code', 'record_code')->with('bindfans'); } /** * 格式化输出时间格式. * @param mixed $value */ public function getCreateTimeAttr($value): string { return $value ? format_datetime($value) : ''; } /** * 格式化输出时间格式. * @param mixed $value */ public function getUpdateTimeAttr($value): string { return $value ? format_datetime($value) : ''; } /** * 格式化输出时间格式. * @param mixed $value */ public function getRefundTimeAttr($value): string { return $value ? format_datetime($value) : ''; } }