*/ #[Endpoint('Update server startup', 'Updates the egg, Docker image, startup command, environment, and install-script behavior.')] #[ResponseFromTransformer(ServerTransformer::class, Server::class, description: 'Server startup updated.', factoryStates: ['withRelationships'], resourceKey: 'server')] public function __invoke(UpdateServerStartupRequest $request, UpdatesServerStartup $modification, Server $server): array { $server = $modification->update($server, $request->actionInput(), User::USER_LEVEL_ADMIN); Activity::event('admin:server.startup') ->subject($server) ->property('name', $server->name) ->log(); return Fractal::item($server) ->transformWith($this->getTransformer(ServerTransformer::class)) ->toResponseArray(); } }