|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
+use Carbon\Carbon;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @property int $id
|
|
* @property int $id
|
|
|
* @property string $member_id
|
|
* @property string $member_id
|
|
@@ -22,6 +24,12 @@ class User extends BaseModel
|
|
|
];
|
|
];
|
|
|
protected $hidden = ['updated_at'];
|
|
protected $hidden = ['updated_at'];
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ function getCreatedAtAttribute($value): string
|
|
|
|
|
+ {
|
|
|
|
|
+ return Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function wallet()
|
|
public function wallet()
|
|
|
{
|
|
{
|
|
|
return $this->belongsTo(Wallet::class, 'id', 'user_id');
|
|
return $this->belongsTo(Wallet::class, 'id', 'user_id');
|