This commit is contained in:
Vckynando12 2025-02-15 01:22:54 +07:00
parent 2b21b1669c
commit 7317d38c09
1 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,8 @@ public function register()
$this->app->singleton(FirebaseAuth::class, function ($app) {
$factory = (new Factory)
->withServiceAccount(json_decode(env('FIREBASE_CREDENTIALS'), true))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'))
->withServiceAccount(base_path('storage/app/firebase/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
return $factory->createAuth();
@ -22,7 +24,10 @@ public function register()
$this->app->singleton(Database::class, function ($app) {
$factory = (new Factory)
->withServiceAccount(config('firebase.credentials'))
->withDatabaseUri(config('firebase.database_url'));
->withDatabaseUri(config('firebase.database_url'))
->withServiceAccount(base_path('storage/app/firebase/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
return $factory->createDatabase();
});