settings->get('blueprint::panel:id') == "" || $this->bp->version() != $this->settings->get('blueprint::version:cache')) { $this->settings->set('blueprint::panel:id', uniqid(rand())."@".$this->bp->version()); $this->settings->set('blueprint::version:cache', $this->bp->version()); $this->bp->exec('key '.$this->settings->get("blueprint::panel:id")); }; return $this->view->make( 'admin.extensions.blueprint.index', [ 'version' => $this->version, 'bp' => $this->bp, 'bplib' => $this->bplib, 'telemetry' => $this->telemetry, 'root' => "/admin/extensions/blueprint", ] ); } /** * @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function update(BlueprintAdminFormRequest $request): RedirectResponse { foreach ($request->normalize() as $key => $value) { $this->settings->set('blueprint::' . $key, $value); } $this->bplib->notify("Your changes have been saved."); return redirect()->route('admin.extensions.blueprint.index'); } } class BlueprintAdminFormRequest extends AdminFormRequest { public function rules(): array { return [ 'placeholder' => 'string', 'developer' => 'string', 'developer:cmd' => 'string', 'telemetry' => 'string', ]; } public function attributes(): array { return [ 'placeholder' => 'Placeholder Value', 'developer' => 'Developer Mode', 'developer:cmd' => 'Blueprint Execute Command', 'telemetry' => 'Telemetry', ]; } }