PHPackages                             nicxonsolutions/google-reviews - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nicxonsolutions/google-reviews

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nicxonsolutions/google-reviews
==============================

Laravel Google Reviews widget powered by Google Business Profile OAuth, with Blade, Livewire, Vue, React, and web component starters.

v1.0.2(3w ago)06↓100%GPL-2.0-or-laterPHPPHP ^8.2

Since May 18Pushed 3w agoCompare

[ Source](https://github.com/robertnicjoo/google-reviews-laravel)[ Packagist](https://packagist.org/packages/nicxonsolutions/google-reviews)[ Docs](https://github.com/robertnicjoo/google-reviews)[ Fund](https://nicxonsolutions.com)[ GitHub Sponsors](https://github.com/robertnicjoo)[ RSS](/packages/nicxonsolutions-google-reviews/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

Nicxon Google Reviews for Laravel
=================================

[](#nicxon-google-reviews-for-laravel)

Production-ready Laravel package for displaying Google Reviews using multiple drivers, including **Google Business Profile OAuth** as the default integration method.

Unlike traditional Google Places integrations, the default driver does **not** require:

- Google Maps Platform billing
- A Google Maps API key
- A Google Place ID
- Credit card setup

The package is designed for:

- Laravel Blade
- Livewire
- Vue
- React
- Alpine.js
- Web Components
- Headless/API usage

---

Table of Contents
=================

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Drivers](#drivers)
    - [Business Profile Driver](#business-profile-driver-default)
    - [Places API Driver](#places-api-driver)
    - [Nicxon Connector Driver](#nicxon-connector-driver-future)
- [Blade Usage](#blade-usage)
- [Livewire Usage](#livewire-usage)
- [JSON API Endpoint](#json-api-endpoint)
- [Vue Integration](#vue-integration)
- [React Integration](#react-integration)
- [Web Component Integration](#web-component-integration)
- [Styling](#styling)
- [Caching](#caching)
- [Error Handling](#error-handling)
- [Security Notes](#security-notes)
- [Production Recommendations](#production-recommendations)
- [Publishing Assets](#publishing-assets)
- [Troubleshooting](#troubleshooting)
- [License](#license)

---

Features
========

[](#features)

- Google Business Profile OAuth integration
- No Google Maps billing required by default
- Automatic caching and stale fallback support
- Blade component support
- Livewire component support
- Vue starter component
- React starter component
- Web Component support
- JSON API endpoint
- Scoped CSS styling
- Graceful error handling
- Multi-location support
- Laravel 10, 11, 12, and 13 compatibility

---

Requirements
============

[](#requirements)

- PHP 8.2+
- Laravel 10+
- A Google account with access to a Google Business Profile
- OAuth credentials for Google Business Profile APIs

Official Google documentation:

-
-

---

Installation
============

[](#installation)

Install the package:

```
composer require nicxonsolutions/google-reviews
```

Publish configuration:

```
php artisan vendor:publish --tag=google-reviews-config
```

Optional asset publishing:

```
php artisan vendor:publish --tag=google-reviews-assets
```

For local/path repository installation and OAuth walkthroughs, see:

```
docs/MANUAL_INSTALL_BUSINESS_PROFILE.md

```

---

Configuration
=============

[](#configuration)

Add the following variables to your `.env` file.

---

Drivers
=======

[](#drivers)

Business Profile Driver (Default)
---------------------------------

[](#business-profile-driver-default)

Recommended for most websites.

```
GOOGLE_REVIEWS_DRIVER=business_profile

GOOGLE_BUSINESS_PROFILE_CLIENT_ID=
GOOGLE_BUSINESS_PROFILE_CLIENT_SECRET=
GOOGLE_BUSINESS_PROFILE_REFRESH_TOKEN=

GOOGLE_BUSINESS_PROFILE_LOCATION=

GOOGLE_REVIEWS_CACHE_TTL=1800
GOOGLE_REVIEWS_STALE_TTL=86400

GOOGLE_REVIEWS_SHOW_ERRORS=false
```

### Notes

[](#notes)

`GOOGLE_BUSINESS_PROFILE_LOCATION` is optional.

If omitted, the package automatically uses the first accessible Business Profile location.

For multi-location accounts:

```
GOOGLE_BUSINESS_PROFILE_LOCATION=accounts/123456789/locations/987654321
```

This value is a Google Business Profile location identifier, not a Google Maps Place ID.

---

Places API Driver
-----------------

[](#places-api-driver)

Optional official Google Places API integration.

```
GOOGLE_REVIEWS_DRIVER=places

GOOGLE_MAPS_API_KEY=
GOOGLE_REVIEWS_PLACE_ID=
```

### Important

[](#important)

This driver requires:

- Google Cloud Platform
- Places API enabled
- Billing enabled on the Google Cloud account

---

Nicxon Connector Driver (Future)
--------------------------------

[](#nicxon-connector-driver-future)

Reserved for future hosted integrations.

```
GOOGLE_REVIEWS_DRIVER=nicxon_connector

NICXON_GOOGLE_REVIEWS_CONNECTOR_ENDPOINT=https://reviews.nicxonsolutions.com
NICXON_GOOGLE_REVIEWS_SITE_TOKEN=
```

Currently this driver returns a friendly setup message until the hosted service becomes available.

---

Blade Usage
===========

[](#blade-usage)

Render the default widget:

```

```

Specify a Business Profile location:

```

```

---

Livewire Usage
==============

[](#livewire-usage)

If `livewire/livewire` is installed, the package automatically registers:

```

```

---

JSON API Endpoint
=================

[](#json-api-endpoint)

The package exposes a resilient frontend endpoint.

Endpoints:

```
/nicxon-google-reviews/data
/nicxon-google-reviews/data?source=accounts/123456789/locations/987654321

```

Example response:

```
{
    "ok": true,
    "message": null,
    "status": 200,
    "place": {
        "name": "Business Name",
        "rating": 4.9
    },
    "reviews": []
}
```

Failure response example:

```
{
    "ok": false,
    "message": "Connect a Google Business Profile account to show Google Reviews.",
    "status": null,
    "place": [],
    "reviews": []
}
```

The endpoint never exposes raw Google API exceptions directly to frontend users.

---

Vue Integration
===============

[](#vue-integration)

Publish assets:

```
php artisan vendor:publish --tag=google-reviews-assets
```

Published Vue component:

```
resources/js/vendor/nicxon-google-reviews/vue/GoogleReviewsWidget.vue

```

Usage example:

```

```

---

React Integration
=================

[](#react-integration)

Published React component:

```
resources/js/vendor/nicxon-google-reviews/react/GoogleReviewsWidget.jsx

```

Usage example:

```

```

---

Web Component Integration
=========================

[](#web-component-integration)

Published web component:

```
resources/js/vendor/nicxon-google-reviews/web-component/nicxon-google-reviews.js

```

Usage:

```

```

With a specific location:

```

```

---

Styling
=======

[](#styling)

The package automatically serves scoped widget CSS:

```
/nicxon-google-reviews/assets/widget.css

```

### Benefits

[](#benefits)

- No Tailwind dependency required on host applications
- Styles are scoped under `.nxgr`
- Prevents style leakage into the host website

Source CSS entry:

```
resources/css/widget.css

```

---

Caching
=======

[](#caching)

The package caches successful review responses automatically.

Environment variables:

```
GOOGLE_REVIEWS_CACHE_TTL=1800
GOOGLE_REVIEWS_STALE_TTL=86400
```

### Cache Strategy

[](#cache-strategy)

- Fresh cache reduces Google API requests
- Stale fallback improves uptime during outages
- Improves performance and page speed

---

Error Handling
==============

[](#error-handling)

The package gracefully handles:

- Missing OAuth credentials
- Invalid refresh tokens
- Unauthorized Google accounts
- Missing Business Profile locations
- Google API outages
- Timeouts
- Rate limits
- Empty review responses

By default, production pages fail quietly.

Enable visible diagnostics during development:

```
GOOGLE_REVIEWS_SHOW_ERRORS=true
```

---

Security Notes
==============

[](#security-notes)

Never commit sensitive credentials into source control.

Recommended:

- Store OAuth credentials in `.env`
- Rotate refresh tokens periodically
- Restrict Google OAuth applications properly
- Use HTTPS in production environments

---

Production Recommendations
==========================

[](#production-recommendations)

Recommended production setup:

- Enable Laravel cache
- Use Redis or Memcached
- Cache reviews aggressively
- Serve widgets via CDN if needed
- Enable stale fallback support
- Queue review refreshes for high-traffic websites

Recommended cache drivers:

```
CACHE_STORE=redis
```

---

Publishing Assets
=================

[](#publishing-assets)

Publish package assets:

```
php artisan vendor:publish --tag=google-reviews-assets
```

Publish configuration:

```
php artisan vendor:publish --tag=google-reviews-config
```

---

Troubleshooting
===============

[](#troubleshooting)

Route Not Defined
-----------------

[](#route-not-defined)

If you encounter:

```
Route [google-reviews.assets.css] not defined

```

Ensure package routes are loaded before route generation.

Run:

```
php artisan optimize:clear
composer dump-autoload
```

---

Widget Not Showing Reviews
--------------------------

[](#widget-not-showing-reviews)

Verify:

- OAuth credentials are valid
- Refresh token is active
- Business Profile access exists
- Location identifier is correct

---

Livewire Component Missing
--------------------------

[](#livewire-component-missing)

Install Livewire:

```
composer require livewire/livewire
```

---

License
=======

[](#license)

Licensed under GPL-2.0-or-later.

Copyright © PT. Nicxon International Solutions

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~0 days

Total

3

Last Release

23d ago

### Community

Maintainers

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

---

Top Contributors

[![robertnicjoo](https://avatars.githubusercontent.com/u/8672823?v=4)](https://github.com/robertnicjoo "robertnicjoo (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nicxonsolutions-google-reviews/health.svg)

```
[![Health](https://phpackages.com/badges/nicxonsolutions-google-reviews/health.svg)](https://phpackages.com/packages/nicxonsolutions-google-reviews)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M120](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76318.2M110](/packages/laravel-mcp)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)

PHPackages © 2026

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