where('nest_id', array_get($data, 'nest_id')) ->where('id', array_get($data, 'config_from')) ->count(); if ($results !== 1) { throw new NoParentConfigurationFoundException(trans('exceptions.egg.invalid_copy_id')); } } return Egg::query()->create(array_merge($data, [ 'uuid' => Uuid::uuid4()->toString(), 'author' => $this->config->get('pterodactyl.service.author'), ])); } }