argument('account'); $password = Str::random(12); // 生成12位随机密码 $hashedPassword = Hash::make($password); $this->info('Generated password for account: ' . $account); $this->info('Plain password: ' . $password); $this->info('Hashed password: ' . $hashedPassword); // 生成 SQL $sql = sprintf( "UPDATE users SET password = '%s' WHERE account = '%s';", $hashedPassword, $account ); $this->newLine(); $this->info('SQL to update password:'); $this->line($sql); } }