modificationService = $modificationService; } /** * Update the startup and environment settings for a specific server. * * @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerStartupRequest $request * @return array * * @throws \Illuminate\Validation\ValidationException * @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException * @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function index(UpdateServerStartupRequest $request): array { $server = $this->modificationService ->setUserLevel(User::USER_LEVEL_ADMIN) ->handle($request->getModel(Server::class), $request->validated()); return $this->fractal->item($server) ->transformWith($this->getTransformer(ServerTransformer::class)) ->toArray(); } }