Closed SRLQNL closed 11 months ago
As the error already tells, the method is undefined, as can be confirmed at https://github.com/googleapis/google-cloud-php-firestore/blob/main/src/DocumentSnapshot.php
The Firestore library is not part of the SDK, it only provides a bridge, as you can read up at https://firebase-php.readthedocs.io/en/stable/cloud-firestore.html
There, you can also find links to documentation by Google.
I web-searched for you: https://github.com/GoogleCloudPlatform/php-docs-samples/blob/main/firestore/src/data_delete_doc.php and https://cloud.google.com/firestore/docs/manage-data/delete-data#php
Describe the bug
Call to undefined method Google\Cloud\Firestore\DocumentSnapshot::delete()
Installed packages
PHP version and extensions
Steps to reproduce the issue.
-
Error message/Stack trace
Additional information
`<?php
namespace App\Http\Controllers;
use Kreait\Firebase\Exception\Auth\FailedToVerifyToken; use Kreait\Firebase\Contract\Storage; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Kreait\Firebase\Factory; use Kreait\Firebase\Auth; use Firebase\Auth\Token\Exception\InvalidToken; use Kreait\Firebase\Exception\Auth\RevokedIdToken; use Google\Cloud\Firestore\FirestoreClient; use Kreait\Firebase\Auth\CreateSessionCookie\FailedToCreateSessionCookie; use Kreait\Laravel\Firebase\Facades\Firebase;
class RegistController extends Controller { public function submit(Request $request){ $auth = app('firebase.auth');
$userProperties = [ 'email' => $request->email, 'password' => $request->password, ];
}`