From 80cb43b1e7e9358f331a19044a616c38e5d5c565 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Wed, 3 Sep 2025 11:02:58 +0800 Subject: [PATCH] update --- app/Models/User.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index c0f9717..a73486a 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -91,14 +91,14 @@ class User extends Authenticatable implements Auditable return $this->username; } -// public function getMobileAttribute($value) -// { -// // 如果url中包含admin字符串,则所有的手机号显示中间4位星号代替 -// if (strpos(request()->url(), 'admin') !== false && env('APP_ENV') == 'local') { -// return substr_replace($value, '****', 3, 4); -// } -// return $value; -// } + public function getMobileAttribute($value) + { + // 如果url中包含admin字符串,则所有的手机号显示中间4位星号代替 + if (strpos(request()->url(), 'admin') !== false && env('APP_ENV') == 'local') { + return substr_replace($value, '****', 3, 4); + } + return $value; + } public function getAppointmentTotalAttribute($value) {