PHPackages                             redbaron76/googlavel - 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. redbaron76/googlavel

ActiveLibrary[API Development](/categories/api)

redbaron76/googlavel
====================

a Google API v3 wrapper for Laravel 4.x

1.0(11y ago)89201MITPHPPHP &gt;=5.4

Since Sep 11Pushed 11y ago2 watchersCompare

[ Source](https://github.com/redbaron76/Googlavel)[ Packagist](https://packagist.org/packages/redbaron76/googlavel)[ Docs](https://github.com/redbaron76/googlavel)[ RSS](/packages/redbaron76-googlavel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

A Google API v3 wrapper for Laravel 4
=====================================

[](#a-google-api-v3-wrapper-for-laravel-4)

This package enables a Laravel flavoured way to manage Google services through its API interface (v3)

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

[](#installation)

Add the required package to your composer.json file

```
{
    "require": {
    	...
		"redbaron76/googlavel": "1.0"
	}
}
```

### Set minimum-stability to 'dev'

[](#set-minimum-stability-to-dev)

In order to avoid Composer's possible conflicts, just set your composer.json 'minimum-stability' to 'dev'

```
{
	...
    "minimum-stability": "dev"
}
```

...then just run `composer update`

Laravel implementation
----------------------

[](#laravel-implementation)

This package includes a ServiceProvider that will give access to a helpful `Googlavel` facade. Set the `GooglavelServiceProvider` reference in your `/app/config/app.php` like this:

```
// app/config/app.php

'providers' => array(
    '...',
    'Redbaron76\Googlavel\GooglavelServiceProvider'
);
```

### Export and edit the configuration file

[](#export-and-edit-the-configuration-file)

Before using this package, you will need to activate a profile from Google developer and get your personal code from the [Google Developers Console](https://console.developers.google.com/) in order to obtain access and use their services through API calls.

[![Google Developers Console](https://cloud.githubusercontent.com/assets/1061849/4231642/b444bf26-3993-11e4-8230-db84b4008496.jpg)](https://cloud.githubusercontent.com/assets/1061849/4231642/b444bf26-3993-11e4-8230-db84b4008496.jpg)

Once obtained `Client ID` and `Client Secret` strings for web application from the Google Developers Console and set a valid `Redirect URI` callback, export the package config file:

`php artisan config:publish redbaron76/googlavel`

...and put them to the oauth2 parameters into the config file

```
// app/config/packages/redbaron76/googlavel/config.php

return array(

    // OAuth2 Setting, you can get these keys in Google Developers Console
    'oauth2_client_id'      => '< YOUR CLIENT ID >',
    'oauth2_client_secret'  => '< YOUR CLIENT SECRET >',
    'oauth2_redirect_uri'   => 'http://localhost:8081/',   // Change it according to your needs

    ...
  );
```

Set also the correct `scope` for the services you will use in your application (and remember to activate related APIs inside the Google Developers Console =&gt; APIS &amp; AUTH =&gt; APIs). Refer to [Google API](https://developers.google.com/google-apps/app-apis) wiki for any help.

Using the Googlavel facade
--------------------------

[](#using-the-googlavel-facade)

Once everything set correctly, you'll gain access to the `Googlavel` facade in a pure Laravel style.

### Need to use the Google Calendar service?

[](#need-to-use-the-google-calendar-service)

```
// routes.php

Route::get('/', function()
{
   if ( Input::has('code') )
   {
   	$code = Input::get('code');

   	// authenticate with Google API
   	if ( Googlavel::authenticate($code) )
   	{
   		return Redirect::to('/protected');
   	}
   }

   // get auth url
   $url = Googlavel::authUrl();

   return link_to($url, 'Login with Google!');
});

Route::get('/logout', function()
{
   // perform a logout with redirect
   return Googlavel::logout('/');
});

Route::get('/protected', function()
{
   // Get the google service (related scope must be set)
   $service = Googlavel::getService('Calendar');

   // invoke API call
   $calendarList = $service->calendarList->listCalendarList();

   foreach ( $calendarList as $calendar )
   {
   	echo "{$calendar->summary} ";
   }

   return link_to('/logout', 'Logout');
});
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b39171e2c37087e57dabad4451ef112a7c4d121d92aa9a8bdbcea7f911d953c9?d=identicon)[Redbaron76](/maintainers/Redbaron76)

---

Top Contributors

[![redbaron76](https://avatars.githubusercontent.com/u/1061849?v=4)](https://github.com/redbaron76 "redbaron76 (11 commits)")

---

Tags

apilaravelgooglelaravel4v3googleapi

### Embed Badge

![Health badge](/badges/redbaron76-googlavel/health.svg)

```
[![Health](https://phpackages.com/badges/redbaron76-googlavel/health.svg)](https://phpackages.com/packages/redbaron76-googlavel)
```

###  Alternatives

[thujohn/analytics

Google Analytics for Laravel 4

113108.7k1](/packages/thujohn-analytics)[hosseinhezami/laravel-gemini

A production-ready Laravel package to integrate with the Google Gemini API. Supports text, image, video, audio, long-context, structured output, files, caching, function-calling and understanding capabilities.

14010.8k1](/packages/hosseinhezami-laravel-gemini)[mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

31204.9k](/packages/mbarwick83-shorty)[teepluss/api

Laravel 4 Internal Request (HMVC)

7034.0k](/packages/teepluss-api)[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[schulzefelix/laravel-search-console

A Laravel package to retrieve data from Google Search Console

5037.8k1](/packages/schulzefelix-laravel-search-console)

PHPackages © 2026

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