PHPackages                             ingress-it-solutions/laravel-google-my-business - 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. ingress-it-solutions/laravel-google-my-business

ActiveLibrary[API Development](/categories/api)

ingress-it-solutions/laravel-google-my-business
===============================================

A package for Laravel which implements the Google My Business API

2.2.1(3y ago)112Apache-2.0PHPPHP &gt;=7.2

Since May 6Pushed 3y agoCompare

[ Source](https://github.com/ingress-it-solutions/Laravel-Google-My-Business)[ Packagist](https://packagist.org/packages/ingress-it-solutions/laravel-google-my-business)[ RSS](/packages/ingress-it-solutions-laravel-google-my-business/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (10)Used By (0)

Laravel Google My Business
==========================

[](#laravel-google-my-business)

Note: To use the Google My Business API you have to apply for access:

This is a Laravel ready implementation of the Google My Business PHP Library (v4.4) as provided by Google on

Please refer to  for information on how the Google My Business API functions - more useful links are available at the bottom of this document.

Debugging
---------

[](#debugging)

I'm putting this above everything else as it's extremely important. The Google My Business Client library doesn't support detailed error responses: [https://developers.google.com/my-business/content/support#detailed\_error\_responses](https://developers.google.com/my-business/content/support#detailed_error_responses)

So when something goes wrong, you get an extremely unhelpful 400 error message such as `Request contains an invalid argument`.

To get more detailed error messages we need to add the HTTP header: `X-GOOG-API-FORMAT-VERSION: 2` to the request and the error message that gets returned will be a lot more useful.

There isn't a pretty way to do this, but all you need to do is open:

`/vendor/google/apiclient/src/Google/Http/REST.php`

And in the `doExecute` function modify as follows

```
$httpHandler = HttpHandlerFactory::build($client);

// Add the header to the request
$request = $request->withHeader('X-GOOG-API-FORMAT-VERSION', '2');
```

Once you've finished debugging, remove this added line.

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

[](#installation)

Run `composer require ingress-it-solutions/laravel-google-my-business`

Or to install via composer - edit your composer.json to require the package.

"require": { "ingress-it-solutions/laravel-google-my-business": "2.\*" }

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

Laravel
-------

[](#laravel)

**Important**: It's highly recommend you use  to handle the Google Client setup. The code examples further down this document assume you're using this library.

To use this Google My Business package in a Laravel project add the following to the `providers` array in your `config/app.php`

```
IngressITSolutions\LaravelGoogleMyBusiness\GoogleMyBusinessServiceProvider::class,
```

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

```
'GoogleMyBusiness' => IngressITSolutions\LaravelGoogleMyBusiness\GoogleMyBusiness::class
```

Google My Business Discovery document
-------------------------------------

[](#google-my-business-discovery-document)

The Google My Business API discovery document is a JSON document that describes the surface for a particular version of the API. You use the discovery document in conjunction with the Google API Discovery Service.

`mybusiness_google_rest_v4p4.json` has been included with this project for your reference (downloaded from: )

**Tips**

- For a guide on Google Discovery documents see:
- A useful tool for browsing this massive document is:
- Join the discussion!  (old platform for discussion: )

Code example
------------

[](#code-example)

(Work in progress)

```
use Google; // See: https://github.com/pulkitjalan/google-apiclient
use GoogleMyBusiness;

class MyExampleClass
{
  function authRedirect()
  {
    // Define the GMB scope
    $scopes = ['https://www.googleapis.com/auth/plus.business.manage'];

    // Define any configs that overrride the /config/google.php defaults from pulkitjalan/google-apiclient
    $googleConfig = array_merge(config('google'), [
      'scopes' => $scopes,
      'redirect_uri' =>
        config('app.callback_url') . '/callback/google/mybusiness',
    ]);

    // Generate an auth request URL
    $googleClient = new Google($googleConfig);
    $loginUrl = $googleClient->createAuthUrl();

    // Send user to Google for Authorisation
    return redirect()->away($loginUrl);
  }

  function getAccountName(Google $googleClient)
  {
    $gmb = new GoogleMyBusiness($googleClient);
    return $gmb->getAccountName();
  }
}
```

Credit
------

[](#credit)

Thanks to [Scotty Bowler](https://github.com/scottybo) for creating this package initially. We are extending it to use for Laravel 9.

Useful links
------------

[](#useful-links)

Mostly for my reference as I develop this package, but you might find them useful too!

- NEW COMMUNITY URL:
-
- [https://developers.google.com/api-client-library/php/start/get\_started](https://developers.google.com/api-client-library/php/start/get_started)
-
-
-
-
-
- [pulkitjalan/google-apiclient#23](https://github.com/pulkitjalan/google-apiclient/issues/23)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

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

Every ~216 days

Recently: every ~311 days

Total

9

Last Release

1196d ago

Major Versions

v1.0.3 → v2.0.02019-09-05

2.2.0 → v3.0.0.x-dev2020-09-10

PHP version history (2 changes)1PHP &gt;=7.0.0

v2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47470909?v=4)[vandanafuletra](/maintainers/vandanafuletra)[@vandanafuletra](https://github.com/vandanafuletra)

---

Top Contributors

[![scottybo](https://avatars.githubusercontent.com/u/11498904?v=4)](https://github.com/scottybo "scottybo (15 commits)")[![CasperLaiTW](https://avatars.githubusercontent.com/u/5094008?v=4)](https://github.com/CasperLaiTW "CasperLaiTW (2 commits)")[![kriiv](https://avatars.githubusercontent.com/u/42486612?v=4)](https://github.com/kriiv "kriiv (1 commits)")[![vandanafuletra](https://avatars.githubusercontent.com/u/47470909?v=4)](https://github.com/vandanafuletra "vandanafuletra (1 commits)")

---

Tags

laravelgooglelaravel5google my businessingressitultim8e

### Embed Badge

![Health badge](/badges/ingress-it-solutions-laravel-google-my-business/health.svg)

```
[![Health](https://phpackages.com/badges/ingress-it-solutions-laravel-google-my-business/health.svg)](https://phpackages.com/packages/ingress-it-solutions-laravel-google-my-business)
```

###  Alternatives

[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[scottybo/laravel-google-my-business

A package for Laravel which implements the Google My Business API

3360.3k](/packages/scottybo-laravel-google-my-business)[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)[thujohn/analytics

Google Analytics for Laravel 4

113108.7k1](/packages/thujohn-analytics)[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)
