service = $service; $this->userId = $userId; } #[NoAdminRequired] #[NoCSRFRequired] public function destroy(int $id): JSONResponse { return $this->handleNotFound(function () use ($id) { $this->service->delete($this->userId, $id); return [ 'success' => True, ]; }); } }