repository = $repository; $this->encrypter = $encrypter; } /** * Create a new node on the panel. * * @return \Pterodactyl\Models\Node * * @throws \Pterodactyl\Exceptions\Model\DataValidationException */ public function handle(array $data) { $data['uuid'] = Uuid::uuid4()->toString(); $data['daemon_token'] = $this->encrypter->encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH)); $data['daemon_token_id'] = Str::random(Node::DAEMON_TOKEN_ID_LENGTH); return $this->repository->create($data, true, true); } }