kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
994 stars 163 forks source link

Kreait\Firebase\Exception\Database\DatabaseError 404 Not Found #77

Closed jewel-rana closed 3 years ago

jewel-rana commented 3 years ago

Hello, I need help. I have configured firebase project successfully when I try to create or read data I got this error, I am using verion 3.0 Kreait\Firebase\Exception\Database\DatabaseError 404 Not Found http://localhost:8000/admin/firebase

Kreait\Firebase\Exception\DatabaseApiExceptionConverter::convertGuzzleRequestException vendor/kreait/firebase-php/src/Firebase/Exception/DatabaseApiExceptionConverter.php:62

jeromegamez commented 3 years ago

You probably need to define the Database URL for your Realtime Database, either with the environment variable FIREBASE_DATABASE_URL or by publishing the config of the package.

More information: https://github.com/kreait/firebase-php/discussions/545#discussioncomment-275084

alanreji commented 3 years ago

I added FIREBASE_DATABASE_URL to .env and that solved the problem.

The documentation at https://github.com/kreait/laravel-firebase#configuration doesn't mention this step.

jeromegamez commented 3 years ago

This is now included in the README.