我正在处理 Laravel Firestore 项目,但它突然加载了很多页面,而没有重定向到所需的页面。跟踪问题时发现与Firebase的连接没有问题,因为可以查看数据库信息,但是调用文档查看数据时出现问题,知道文档有数据 这是代码
$collectionReference = $this->database->collection('sections');
$documentReference = $collectionReference->document('4ZlIw3xA0HKfR1HKhtPj');
$snapshot = $documentReference->snapshot();
return view('section.edit', compact('snapshot'));
当我调用 $sapshot 变量时,它会加载很多页面并且从不给我数据。
希望大家帮帮我
提前致谢