Download the PHP package revolution/laravel-google-sheets without Composer

On this page you can find all versions of the php package revolution/laravel-google-sheets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-google-sheets

Google Sheets API v4 for Laravel

packagist Maintainability Test Coverage

Requirements

Versioning

Installation

Composer

Laravel

  1. Run php artisan vendor:publish --tag="google-config" to publish the google config file

    // config/google.php
    
    // OAuth
    'client_id'        => env('GOOGLE_CLIENT_ID', ''),
    'client_secret'    => env('GOOGLE_CLIENT_SECRET', ''),
    'redirect_uri'     => env('GOOGLE_REDIRECT', ''),
    'scopes'           => [\Google\Service\Sheets::DRIVE, \Google\Service\Sheets::SPREADSHEETS],
    'access_type'      => 'online',
    'approval_prompt'  => 'auto',
    'prompt'           => 'consent', //"none", "consent", "select_account" default:none
    
    // or Service Account
    'file'    => storage_path('credentials.json'),
    'enable'  => env('GOOGLE_SERVICE_ENABLED', true),
  2. Get API Credentials from https://developers.google.com/console
    Enable Google Sheets API, Google Drive API.

  3. Configure .env as needed

    GOOGLE_APPLICATION_NAME=
    GOOGLE_CLIENT_ID=
    GOOGLE_CLIENT_SECRET=
    GOOGLE_REDIRECT=
    GOOGLE_DEVELOPER_KEY=
    GOOGLE_SERVICE_ENABLED=
    GOOGLE_SERVICE_ACCOUNT_JSON_LOCATION=

Demo

Another Google API Series.

Select auth type

You must select an authentication type and configure it appropriately.

Usage

id name mail
1 name1 mail1
2 name2 mail2

https://docs.google.com/spreadsheets/d/{spreadsheetID}/...

Basic Laravel Usage

Basic Non-Laravel Usage

Get a sheet's values with the header as the key

Blade

Using A1 Notation

Updating a specific range

Append a set of values to a sheet

Append a set of values with keys

Add a new sheet

Deleting a sheet

Specifying query parameters

https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get#query-parameters

Use original Google_Service_Sheets

see https://github.com/google/google-api-php-client-services/blob/master/src/Google/Service/Sheets.php

LICENSE

MIT
Copyright kawax


All versions of laravel-google-sheets with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/container Version ^11.0
illuminate/support Version ^11.0
google/apiclient Version ^2.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package revolution/laravel-google-sheets contains the following files

Loading the files please wait ....