没有数据的 Laravel Firestore 页面加载

时间:2021-08-01 14:07:18

标签: laravel google-cloud-firestore

我正在处理 Laravel Firestore 项目,但它突然加载了很多页面,而没有重定向到所需的页面。跟踪问题时发现与Firebase的连接没有问题,因为可以查看数据库信息,但是调用文档查看数据时出现问题,知道文档有数据 这是代码

$collectionReference = $this->database->collection('sections');
$documentReference = $collectionReference->document('4ZlIw3xA0HKfR1HKhtPj');
$snapshot = $documentReference->snapshot();
return view('section.edit', compact('snapshot'));

当我调用 $sapshot 变量时,它会加载很多页面并且从不给我数据。

希望大家帮帮我

提前致谢

0 个答案:

没有答案