dev-master
9999999-devGoogle Sheets API v4 library for Laravel5
MIT
The Requires
- php >=7.0.0
- google/apiclient ^2.0
The Development Requires
by Tetsuo Makino
laravel google sheets
Google Sheets API v4 library for Laravel5
Google Sheets APIをLaravelから利用するためのライブラリです。, (*1)
インストールするには、Composerを使うことをお勧めします。, (*2)
curl -sS https://getcomposer.org/installer | php
Composerコマンドを実行して、安定版のlaravel-gsaをインストールします。, (*3)
composer.phar require macki/laravel-gsa
アプリケーション用の設定ファイルを追加します。, (*4)
config/google-sheet-api.php, (*5)
php artisan vendor:publish
.env, (*6)
GOOGLE_SHEET_APPLICATION_NAME= GOOGLE_SHEET_SECRET_PATH= GOOGLE_SHEET_ACCESS_TYPE=
利用する前にcredentialsファイルを用意しておいてください。, (*7)
<?php use GoogleSheetsApiClient; $service = GoogleSheetsApiClient::getService(); $response = $service->spreadsheets_values->get($sheetId, 'シート1!A1:D5'); foreach ($response->getValues() as $index => $cols) { echo sprintf('#%d >> "%s"', $index + 1, implode('", "', $cols)) . PHP_EOL;
MIT, (*8)
Google Sheets API v4 library for Laravel5
MIT
laravel google sheets