user:clear
parent
b1ba1d373a
commit
f4baac8378
|
|
@ -41,6 +41,7 @@ class UserClear extends Command
|
||||||
{
|
{
|
||||||
$user = User::query()->findOrFail($this->argument('id'));
|
$user = User::query()->findOrFail($this->argument('id'));
|
||||||
$user->update(['phone' => null]);
|
$user->update(['phone' => null]);
|
||||||
|
$user->tokens()->delete();
|
||||||
$count = $user->socialites()->where('socialite_type', SocialiteType::WechatMiniProgram->value)->delete();
|
$count = $user->socialites()->where('socialite_type', SocialiteType::WechatMiniProgram->value)->delete();
|
||||||
$this->info($count);
|
$this->info($count);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue