admin管理员组文章数量:1434889
I am working on a Laravel project that uses Firebase Firestore to manage some data. Initially, I was using Laravel 9, and everything worked fine. However, after upgrading to Laravel 11, I encountered a problem.
When I try to send data to Firestore from Laravel, I receive the following error in my browser: This site can’t be reached, localhost refused to connect.
Here is the code I’m using:
$section = Section::where('id', $brand->section_id)->first();
$testSection = 0;
$testSection = $brand->section_id == 0
? [
"id" => 0,
"name" => "",
]
: [
"id" => $section->id,
"name" => $section->name,
];
$firestore = app('firebase.firestore')
->database()
->collection('brands')
->document($brand->id)
->set([
"id" => $brand->id,
"name" => $brand->name,
"section" => $testSection,
"image" => $brand->logo,
"contained" => $brand->contained,
"vue" => $brand->vue,
"status" => $brand->status,
]);
本文标签:
版权声明:本文标题:php - Error "This site can’t be reached, localhost refused to connect" after upgrading to Laravel 11 while sen 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745644425a2668049.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论