PHP code example of renedekat / laravel-bigquery
1. Go to this page and download the library: Download renedekat/laravel-bigquery 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/ */
renedekat / laravel-bigquery example snippets
// config/app.php
'providers' => [
...
ReneDeKat\BigQuery\BigQueryServiceProvider::class,
...
];
// config/app.php
'aliases' => [
...
'BigQuery' => ReneDeKat\BigQuery\BigQueryFacade::class,
...
];
return [
/*
|--------------------------------------------------------------------------
| Application Credentials
|--------------------------------------------------------------------------
|
| Path to the Service Account Credentials JSON File
|
| https://googlecloudplatform.github.io/google-cloud-php/#/docs/google-cloud/v0.35.0/guides/authentication
|
*/
'application_credentials' => env('GOOGLE_CLOUD_APPLICATION_CREDENTIALS'),
/*
|--------------------------------------------------------------------------
| Project ID
|--------------------------------------------------------------------------
|
| The Project Name is a user-friendly name,
| while the Project ID is ryClient will use.
|
| Optional parameters: "authCacheOptions", "authHttpHandler", "httpHandler", "retries", "scopes", "returnInt64AsObject"
*/
'client_options' => [
'retries' => 3, // Default
],
];
BigQuery::apiMethod();
app('bigquery')->apiMethod();
$dataset = BigQuery::createDataset('myNewDataSet');
BigQuery::dataset(myNewDataSet)->table('aTable')->exists());
bash
php artisan vendor:publish --provider="ReneDeKat\BigQuery\BigQueryServiceProvider"