mirror of
https://github.com/kevin-DL/commander_league_api.git
synced 2026-01-11 18:44:32 +00:00
Added the firebase package
This commit is contained in:
@@ -23,9 +23,8 @@ $app = new Laravel\Lumen\Application(
|
|||||||
dirname(__DIR__)
|
dirname(__DIR__)
|
||||||
);
|
);
|
||||||
|
|
||||||
// $app->withFacades();
|
$app->withFacades();
|
||||||
|
$app->withEloquent();
|
||||||
// $app->withEloquent();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -94,6 +93,7 @@ $app->configure('app');
|
|||||||
// $app->register(App\Providers\AppServiceProvider::class);
|
// $app->register(App\Providers\AppServiceProvider::class);
|
||||||
// $app->register(App\Providers\AuthServiceProvider::class);
|
// $app->register(App\Providers\AuthServiceProvider::class);
|
||||||
// $app->register(App\Providers\EventServiceProvider::class);
|
// $app->register(App\Providers\EventServiceProvider::class);
|
||||||
|
$app->register(Kreait\Laravel\Firebase\ServiceProvider::class);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5",
|
"php": "^7.2.5",
|
||||||
|
"kreait/laravel-firebase": "^2.4",
|
||||||
"laravel/lumen-framework": "^7.0"
|
"laravel/lumen-framework": "^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
1283
composer.lock
generated
1283
composer.lock
generated
File diff suppressed because it is too large
Load Diff
143
config/firebase.php
Normal file
143
config/firebase.php
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Credentials / Service Account
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* In order to access a Firebase project and its related services using a
|
||||||
|
* server SDK, requests must be authenticated. For server-to-server
|
||||||
|
* communication this is done with a Service Account.
|
||||||
|
*
|
||||||
|
* If you don't already have generated a Service Account, you can do so by
|
||||||
|
* following the instructions from the official documentation pages at
|
||||||
|
*
|
||||||
|
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
|
||||||
|
*
|
||||||
|
* Once you have downloaded the Service Account JSON file, you can use it
|
||||||
|
* to configure the package.
|
||||||
|
*
|
||||||
|
* If you don't provide credentials, the Firebase Admin SDK will try to
|
||||||
|
* autodiscover them
|
||||||
|
*
|
||||||
|
* - by checking the environment variable FIREBASE_CREDENTIALS
|
||||||
|
* - by checking the environment variable GOOGLE_APPLICATION_CREDENTIALS
|
||||||
|
* - by trying to find Google's well known file
|
||||||
|
* - by checking if the application is running on GCE/GCP
|
||||||
|
*
|
||||||
|
* If no credentials file can be found, an exception will be thrown the
|
||||||
|
* first time you try to access a component of the Firebase Admin SDK.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
'credentials' => [
|
||||||
|
'file' => env('FIREBASE_CREDENTIALS'),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If you want to prevent the auto discovery of credentials, set the
|
||||||
|
* following parameter to false. If you disable it, you must
|
||||||
|
* provide a credentials file.
|
||||||
|
*/
|
||||||
|
'auto_discovery' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Firebase Realtime Database
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In most of the cases the project ID defined in the credentials file
|
||||||
|
* determines the URL of your project's Realtime Database. If the
|
||||||
|
* connection to the Realtime Database fails, you can override
|
||||||
|
* its URL with the value you see at
|
||||||
|
*
|
||||||
|
* https://console.firebase.google.com/u/1/project/_/database
|
||||||
|
*
|
||||||
|
* Please make sure that you use a full URL like, for example,
|
||||||
|
* https://my-project-id.firebaseio.com
|
||||||
|
*/
|
||||||
|
'url' => env('FIREBASE_DATABASE_URL'),
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamic_links' => [
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dynamic links can be built with any URL prefix registered on
|
||||||
|
*
|
||||||
|
* https://console.firebase.google.com/u/1/project/_/durablelinks/links/
|
||||||
|
*
|
||||||
|
* You can define one of those domains as the default for new Dynamic
|
||||||
|
* Links created within your project.
|
||||||
|
*
|
||||||
|
* The value must be a valid domain, for example,
|
||||||
|
* https://example.page.link
|
||||||
|
*/
|
||||||
|
'default_domain' => env('FIREBASE_DYNAMIC_LINKS_DEFAULT_DOMAIN')
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Firebase Cloud Storage
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
'storage' => [
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Your project's default storage bucket usually uses the project ID
|
||||||
|
* as its name. If you have multiple storage buckets and want to
|
||||||
|
* use another one as the default for your application, you can
|
||||||
|
* override it here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default_bucket' => env('FIREBASE_STORAGE_DEFAULT_BUCKET'),
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Caching
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* The Firebase Admin SDK can cache some data returned from the Firebase
|
||||||
|
* API, for example Google's public keys used to verify ID tokens.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cache_store' => env('FIREBASE_CACHE_STORE', 'file'),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Logging
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Enable logging of HTTP interaction for insights and/or debugging.
|
||||||
|
*
|
||||||
|
* Log channels are defined in config/logging.php
|
||||||
|
*
|
||||||
|
* Successful HTTP messages are logged with the log level 'info'.
|
||||||
|
* Failed HTTP messages are logged with the the log level 'notice'.
|
||||||
|
*
|
||||||
|
* Note: Using the same channel for simple and debug logs will result in
|
||||||
|
* two entries per request and response.
|
||||||
|
*/
|
||||||
|
|
||||||
|
'logging' => [
|
||||||
|
'http_log_channel' => env('FIREBASE_HTTP_LOG_CHANNEL', null),
|
||||||
|
'http_debug_log_channel' => env('FIREBASE_HTTP_DEBUG_LOG_CHANNEL', null),
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
* Debug (deprecated)
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* Enable debugging of HTTP requests made directly from the SDK.
|
||||||
|
*/
|
||||||
|
'debug' => env('FIREBASE_ENABLE_DEBUG', false),
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user