Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

How to get id of new document #36

@elmismopancho

Description

@elmismopancho

I've been looking at the docs and the code but I can't find a way to get the id of a new document. Is it possible?
Here's an example:

$firestoreClient = new FirestoreClient('xxx', 'yyyyyyyyyyyyyyyyyyyyyyy', [
     'database' => '(default)',
]);
$document = new FirestoreDocument;
$document->fillValues($data);
$firestoreClient->addDocument('my-collection', $document);
$newdocid = ??????

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions