feat: 增加自定义头像上传、自动压缩与自动清理功能,统一全站头像路径读取逻辑
This commit is contained in:
@@ -170,6 +170,10 @@ class UserController extends Controller
|
||||
\Illuminate\Support\Facades\Cache::forget($codeKey);
|
||||
}
|
||||
|
||||
if (isset($data['headface']) && $data['headface'] !== $user->headface) {
|
||||
$user->deleteCustomAvatar();
|
||||
}
|
||||
|
||||
$user->update($data);
|
||||
|
||||
return response()->json(['status' => 'success', 'message' => '资料更新成功。']);
|
||||
|
||||
Reference in New Issue
Block a user