改进 生日显示

This commit is contained in:
iVampireSP.com 2023-01-15 07:34:09 +08:00
parent 6e10903928
commit 802a626419
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 10 additions and 2 deletions

View File

@ -47,6 +47,14 @@ class User extends Authenticatable
'birthday_at' => 'date',
];
protected $dates = [
'email_verified_at',
'real_name_verified_at',
'banned_at',
'birthday_at',
];
protected static function boot()
{
parent::boot();

View File

@ -7,7 +7,7 @@
@if ($user->real_name_verified_at)
<span class="text-success">实人验证于 {{ $user->real_name_verified_at }} </span>
<br />
<br/>
@endif
@ -28,7 +28,7 @@
@if ($user->birthday_at)
<p>生日: {{ $user->birthday_at }}</p>
<p>生日: {{ $user->birthday_at->format('Y-m-d') }}</p>
@endif