forrestedw/laravel-google-docs

A convenient chainable wrapper for google/apiclient

Maintainers

Package info

github.com/forrestedw/laravel-google-docs

Type:project

pkg:composer/forrestedw/laravel-google-docs

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2020-05-06 14:42 UTC

This package is auto-updated.

Last update: 2026-03-07 03:33:59 UTC


README

A convenient chainable wrapper for google/apiclient

It's simple now. More functions are added when I need them.

Get started

Watch this video to set up your credetials.json, then:

use Forrestedw\GoogleDocs\GoogleDoc;

$document = (new GoogleDoc);

Get a document by its id:

$document->getById('1QbVPiSgv8FR30Ap22cv5frIiO4VCUkRA5srdYSc8D3w'); // id from the url, eg https://docs.google.com/document/d/1QbVPiSgv8FR30Ap22cv5frIiO4VCUkRA5srdYSc8D3w/

Functions

Find and replace all instances of lead in the document with gold:

$document->findAndReplace('lead', 'gold'); // returns the number of replacements made.
$title = $document->getTitle() // eg 'Document 1'