PHP code example of wethinkright / google-cloud-silex
1. Go to this page and download the library: Download wethinkright/google-cloud-silex 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/ */
wethinkright / google-cloud-silex example snippets
use Silex\Application;
use WeThinkRight\GoogleCloudSilex\GoogleCloudProvider;
$app = new Application;
$app->register(new GoogleCloudProvider(), [
'cloud.config' => [
'keyFilePath' => '/path/to/service/account/credentials.json'
]
]);
$pubsub = $app['cloud']->pubsub();