PHP code example of ctf0 / firebase-broadcast-driver

1. Go to this page and download the library: Download ctf0/firebase-broadcast-driver 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/ */

    

ctf0 / firebase-broadcast-driver example snippets


// config/broadcasting

return [
    'connections' => [
        // ...

        'firebase' => [
            'driver'          => 'firebase',
            'type'            => 'firestore', // database, firestore or messaging
            'databaseURL'     => env('FB_DB_URL'), // the real time database url
            'creds_file'      => env('FB_CREDENTIALS_FILE'), // service account json file
            'collection_name' => env('FB_COLLECTION_NAME'), // ex.notifications
        ],
    ],
];