<?php 

require __DIR__.'/vendor/autoload.php';
use Kreait\Firebase\Factory;
use Kreait\Firebase\Contract\Auth;
use Kreait\Firebase\Exception\Auth\FailedToVerifyToken;
use Kreait\Firebase\Contract\Storage;
use Illuminate\Support\Str;
use Google\Cloud\Storage\StorageClient;
//require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$factory = (new Factory)
            ->withServiceAccount('sham-foam-firebase-adminsdk-pm32g-1ee0976a9a.json')
            ->withDatabaseUri('https://sham-foam-default-rtdb.firebaseio.com/');

$database = $factory->createDatabase();
$auth = $factory->createAuth();
$storage = $factory->createStorage();
$bucket = $storage->getBucket();

?>