PHP code example of sondnpt00343 / laravel-firebase
1. Go to this page and download the library: Download sondnpt00343/laravel-firebase library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// bootstrap/app.php
$app->register(Kreait\Laravel\Firebase\ServiceProvider::class);
// If you want to use the Facades provided by the package
$app->withFacades();
use Kreait\Laravel\Firebase\Facades\Firebase;
// Return an instance of the Auth component for the default Firebase project
$defaultAuth = Firebase::auth();
// Return an instance of the Auth component for a specific Firebase project
$appAuth = Firebase::project('app')->auth();
$anotherAppAuth = Firebase::project('another-app')->auth();