config = $config; $this->repository = $repository; } /** * Create a new nest on the system. * * @throws \Pterodactyl\Exceptions\Model\DataValidationException */ public function handle(array $data, string $author = null): Nest { return $this->repository->create([ 'uuid' => Uuid::uuid4()->toString(), 'author' => $author ?? $this->config->get('pterodactyl.service.author'), 'name' => array_get($data, 'name'), 'description' => array_get($data, 'description'), ], true, true); } }