PHP code example of mitni / laravel-google-spreadsheet
1. Go to this page and download the library: Download mitni/laravel-google-spreadsheet 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/ */
mitni / laravel-google-spreadsheet example snippets
use Mitni\Google\GoogleSpreadsheet;
$client = GoogleSpreadsheet::getClient("the/path/to/credential.json");
// Get the file by file ID
$file = $client->file("XXXxxxXXXXxxxXXXX");
// Get the sheet by title
$sheet = $file->sheet("Sheet1");
// Flush all rows in the sheet
var_dump($sheet->items);