Browse Source

线上订单时间 转格式

master
Lemon 5 years ago
parent
commit
c6f832f7e0
  1. 9
      app/Model/v3/Order.php

9
app/Model/v3/Order.php

@ -8,6 +8,15 @@ class Order extends Model
{
protected $table = 'lanzu_order';
protected $appends = [
'created_at_text',
];
public function getCreatedAtTextAttribute()
{
return date('Y-m-d H:i:s', $this->attributes['created_at']);
}
public function orderGoods()
{
return $this->hasMany(OrderGoods::class, 'order_id', 'id');

Loading…
Cancel
Save