From 0d6e3ecf2efb2bbc033c0396ff50762fd285c2ab Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Tue, 8 Sep 2020 19:08:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E6=94=B6=E5=85=A5=E6=98=8E?= =?UTF-8?q?=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Model/v3/FinancialRecord.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Model/v3/FinancialRecord.php b/app/Model/v3/FinancialRecord.php index ace1d98..e214652 100644 --- a/app/Model/v3/FinancialRecord.php +++ b/app/Model/v3/FinancialRecord.php @@ -92,6 +92,14 @@ class FinancialRecord extends Model 'comment', 'status', ]; + protected $appends = [ + 'created_at_text', + ]; + + public function getCreatedAtTextAttribute() + { + return date('Y-m-d H:i:s', $this->attributes['created_at']); + } /** * The attributes that should be cast to native types. *