fix firebase provider
This commit is contained in:
parent
bd9fe33923
commit
aa1aa58ffc
|
@ -13,16 +13,16 @@ public function register()
|
|||
{
|
||||
$this->app->singleton(FirebaseAuth::class, function ($app) {
|
||||
$factory = (new Factory)
|
||||
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
|
||||
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
||||
->withServiceAccount(json_decode(env('FIREBASE_CREDENTIALS'), true))
|
||||
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
||||
|
||||
return $factory->createAuth();
|
||||
});
|
||||
|
||||
$this->app->singleton(Database::class, function ($app) {
|
||||
$factory = (new Factory)
|
||||
->withServiceAccount(storage_path('app/smartcab-8bb42-firebase-adminsdk-fbsvc-de33a8e45b.json'))
|
||||
->withDatabaseUri(env('FIREBASE_DATABASE_URL'));
|
||||
->withServiceAccount(config('firebase.credentials'))
|
||||
->withDatabaseUri(config('firebase.database_url'));
|
||||
|
||||
return $factory->createDatabase();
|
||||
});
|
||||
|
@ -32,4 +32,4 @@ public function boot()
|
|||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue