update user api

This commit is contained in:
2026-03-06 15:29:04 +08:00
parent e6130d76c7
commit 3eb517bc3a
8 changed files with 412 additions and 11 deletions
+1 -8
View File
@@ -97,14 +97,7 @@ class User extends Model implements Authenticatable
return $this->hasMany(Platform::class, 'developer_id');
}
protected function boot(): void
{
parent::boot();
static::deleting(function (User $user) {
$user->developedPlatforms()->update(['developer_id' => 1]);
});
}
// @TODO 重新实现删除用户时平台归属转移逻辑(Hyperf 不支持 static::deleting 事件绑定)
/**
* Check if refresh token is valid.