PHPackages                             irisdande/lara5-googleclient-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. irisdande/lara5-googleclient-api

ActiveLibrary[API Development](/categories/api)

irisdande/lara5-googleclient-api
================================

Google api php client wrapper with Cloud Platform and Laravel 4 &amp; 5 support

112PHP

Since Jul 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/IrisDande/lara5-googleclient-api)[ Packagist](https://packagist.org/packages/irisdande/lara5-googleclient-api)[ RSS](/packages/irisdande-lara5-googleclient-api/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Google Api Client Wrapper
=========================

[](#google-api-client-wrapper)

> Google api php client wrapper with Cloud Platform and Laravel 4 &amp; 5 support

[![Build Status](https://camo.githubusercontent.com/01ee0ceee4ca3acac7e5ac3c7a836434722338b16922d1e09551ae6772315adc/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6972697364616e64652f6c617261352d676f6f676c65636c69656e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/irisdande/lara5-googleclient-api)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c8eb0a1de5ca748de618477b9a3be07f570e54ec216c5cf4633ccbe0d9984fd1/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6972697364616e64652f6c617261352d676f6f676c65636c69656e742d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/irisdande/lara5-googleclient-api/)[![Coverage Status](https://camo.githubusercontent.com/0e272a18a20790e1219face391371a281415aee9e6320050774988aa98c54a3a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6972697364616e64652f6c617261352d676f6f676c65636c69656e742d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/irisdande/lara5-googleclient-api/code-structure/master)[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://www.opensource.org/licenses/MIT)[![Latest Version](https://camo.githubusercontent.com/5d5b2b347d674ab9b538d34a742a3d50c5e63f54e489440074b7c33da19a2aea/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6972697364616e64652f6c617261352d676f6f676c65636c69656e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irisdande/lara5-googleclient-api)[![Total Downloads](https://camo.githubusercontent.com/5a0381d9bdf6f93f0bf5ac572148d6e44353e6d1e03799abe81dad2256ea36fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6972697364616e64652f6c617261352d676f6f676c65636c69656e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/irisdande/lara5-googleclient-api)

Requirements
------------

[](#requirements)

This package requires PHP &gt;=5.4

Installation
------------

[](#installation)

Install via composer - edit your `composer.json` to require the package.

```
"require": {
    "irisdande/lara5-googleclient-api": "2.*"
}
```

Then run `composer update` in your terminal to pull it in.

Or use `composer require irisdande/lara5-googleclient-api`

Laravel
-------

[](#laravel)

To use in laravel add the following to the `providers` array in your `config/app.php`

```
IrisDande\Google\GoogleServiceProvider::class
```

Next add the following to the `aliases` array in your `config/app.php`

```
'Google' => IrisDande\Google\Facades\Google::class
```

Finally run `php artisan vendor:publish --provider="IrisDande\Google\GoogleServiceProvider" --tag="config"` to publish the config file.

#### Looking for a Laravel 4 compatible version?

[](#looking-for-a-laravel-4-compatible-version)

Checkout the [1.0 branch](https://github.com/IrisDande/lara5-googleclient-api/tree/1.0)

Usage
-----

[](#usage)

The `Client` class takes an array as the first parameter, see example of config file below:

```
return [
    /*
    |----------------------------------------------------------------------------
    | Google application name
    |----------------------------------------------------------------------------
    */
    'application_name' => '',

    /*
    |----------------------------------------------------------------------------
    | Google OAuth 2.0 access
    |----------------------------------------------------------------------------
    |
    | Keys for OAuth 2.0 access, see the API console at
    | https://developers.google.com/console
    |
    */
    'client_id' => '',
    'client_secret' => '',
    'redirect_uri' => '',
    'scopes' => [],
    'access_type' => 'online',
    'approval_prompt' => 'auto',

    /*
    |----------------------------------------------------------------------------
    | Google developer key
    |----------------------------------------------------------------------------
    |
    | Simple API access key, also from the API console. Ensure you get
    | a Server key, and not a Browser key.
    |
    */
    'developer_key' => '',

    /*
    |----------------------------------------------------------------------------
    | Google service account
    |----------------------------------------------------------------------------
    |
    | Set the information below to use assert credentials
    | Leave blank to use app engine or compute engine.
    |
    */
    'service' => [
        /*
        | Example xxx@developer.gserviceaccount.com
        */
        'account' => '',

        /*
        | Example ['https://www.googleapis.com/auth/cloud-platform']
        */
        'scopes' => [],

        /*
        | Path to key file
        | Example storage_path().'/key/google.p12'
        */
        'key' => '',
    ]
];
```

To use the Google Cloud Platform Services you can either set the information in the config file under `service`, or if running under compute engine (or app engine) leave it blank.

`NOTE: service => ['account'] is the service Email Address and not the Client ID!`

Get `Google_Client`

```
$client = new IrisDande\Google\Client($config);
$googleClient = $client->getClient();
```

Laravel Example:

```
$googleClient = Google::getClient();
```

Get a service

```
$client = new IrisDande\Google\Client($config);

// returns instance of \Google_Service_Storage
$storage = $client->make('storage');

// list buckets example
$storage->buckets->listBuckets('project id');

// get object example
$storage->objects->get('bucket', 'object');
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/880ff0fbd1b5fdbe973bd2cba6ed0fdc8c70c081af5f6fa3dbe1dfd02bf366a0?d=identicon)[IrisDande](/maintainers/IrisDande)

---

Top Contributors

[![chienvhsmart](https://avatars.githubusercontent.com/u/30175967?v=4)](https://github.com/chienvhsmart "chienvhsmart (4 commits)")[![IrisDande](https://avatars.githubusercontent.com/u/10474048?v=4)](https://github.com/IrisDande "IrisDande (1 commits)")

### Embed Badge

![Health badge](/badges/irisdande-lara5-googleclient-api/health.svg)

```
[![Health](https://phpackages.com/badges/irisdande-lara5-googleclient-api/health.svg)](https://phpackages.com/packages/irisdande-lara5-googleclient-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)[pixelant/pxa-social-feed

Add Facebook, Instagram, and Twitter feeds to your site.

2349.3k](/packages/pixelant-pxa-social-feed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
