How to Display Google Business Profile Reviews in Laravel Using Google API

Laravel Applications Aug 30, 2025 Engr Mejba Ahmed 2 min read
๐Ÿ“š Table of Contents
How to Display Google Business Profile Reviews in Laravel Using Google API

Introduction

When youโ€™re running a business, trust is everything. And what better way to build trust than by showcasing your verified Google reviews directly on your website?

Think about it: visitors already Google your company before doing business with you. By displaying real customer reviews from your Google Business Profile right inside your Laravel-powered website, you instantly boost credibility, conversions, and SEO rankings.

But hereโ€™s the challenge: Google doesnโ€™t give you a simple copy-paste widget anymore. To do this properlyโ€”and securelyโ€”youโ€™ll need to use the Google Places API. Donโ€™t worry, though. In this guide, Iโ€™ll walk you through everything: from getting your API key to fetching and displaying reviews dynamically in Laravel.

By the end of this tutorial, youโ€™ll have a fully working solution that makes your website look professional, trustworthy, and conversion-ready.


Why Show Google Reviews on Your Laravel Website?

Before diving into the code, letโ€™s understand why this matters:

  • Trust at first glance โ€“ Prospective clients donโ€™t just take your word for it. They want proof. Google reviews provide exactly that.
  • SEO advantage โ€“ Google loves when businesses integrate their ecosystem. Embedding reviews can positively impact your siteโ€™s relevance and authority.
  • Conversion boost โ€“ Social proof is one of the strongest conversion drivers. A 5-star badge with verified testimonials can tilt buying decisions in your favor.
  • Consistency โ€“ Instead of manually copying reviews, this integration keeps your website updated automatically.

Step 1: Set Up a Google Cloud Project

To use the Google Places API, youโ€™ll first need to create a Google Cloud project:

  1. Go to the Google Cloud Console.
  2. Create a new project and give it a meaningful name (e.g., โ€œLaravel Reviews Integrationโ€).
  3. Enable Places API from the API library.
  4. Generate an API Key.

โšก Pro Tip: Create a separate Server Key (not a browser key), since Laravel will be making server-side requests.


Step 2: Find Your Google Place ID

Every business profile is tied to a unique Place ID. Youโ€™ll need this to fetch reviews.

  1. Go to Google Place ID Finder.
  2. Search your business name (e.g., Ramlit Limited).
  3. Copy the place_id.

Keep it safeโ€”youโ€™ll need it in .env.


Step 3: Store Keys Securely in Laravel

Open your .env file and add:

GOOGLE_PLACES_API_KEY=your_api_key_here
GOOGLE_PLACE_ID=your_place_id_here
GOOGLE_REVIEWS_CACHE_HOURS=12

This ensures sensitive credentials arenโ€™t hardcoded.


Step 4: Create a GooglePlaces Service in Laravel

In app/Services/GooglePlaces.php:

<?php

namespace App\Services;

use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;

class GooglePlaces
{
    public function details(): array
    {
        $ttlHours = (int) config('services.google_places.cache_h', 12);

        return Cache::remember('google.place.details', now()->addHours($ttlHours), function () {
            $resp = Http::get('https://maps.googleapis.com/maps/api/place/details/json', [
                'place_id' => config('services.google_places.place_id'),
                'fields'   => 'name,rating,user_ratings_total,reviews',
                'key'      => config('services.google_places.api_key'),
            ])->json();

            if (($resp['status'] ?? '') !== 'OK') {
                return ['name' => null, 'rating' => null, 'total' => 0, 'reviews' => []];
            }

            $r = $resp['result'];

            return [
                'name'   => $r['name'] ?? 'Google Reviews',
                'rating' => $r['rating'] ?? null,
                'total'  => $r['user_ratings_total'] ?? 0,
                'reviews'=> collect($r['reviews'] ?? [])->map(fn ($rev) => [
                    'author'  => $rev['author_name'] ?? 'Google user',
                    'profile' => $rev['author_url'] ?? null,
                    'rating'  => $rev['rating'] ?? null,
                    'text'    => $rev['text'] ?? '',
                    'time'    => $rev['relative_time_description'] ?? '',
                ])->toArray(),
            ];
        });
    }
}

โœ” This service fetches your reviews, formats them neatly, and caches them for performance.


Step 5: Update Controller

Inside your PageController.php:

use App\Services\GooglePlaces;

public function index(Request $request, GooglePlaces $places)
{
    $reviews = $places->details();

    $placeId = config('services.google_places.place_id');
    $googleReviewsUrl = 'https://www.google.com/maps/place/?q=place_id:' . $placeId;
    $googleWriteUrl   = 'https://search.google.com/local/writereview?placeid=' . $placeId;

    return view('ramlit-limited.pages.index', [
        'reviews' => $reviews,
        'googleReviewsUrl' => $googleReviewsUrl,
        'googleWriteUrl'   => $googleWriteUrl,
    ]);
}

Step 6: Blade Template for Reviews

Now, letโ€™s make it look good.

<section class="google-reviews">
    <div class="container">
        <div class="section-title">
            <h5>What Clients Say</h5>
            <h2>Trusted Worldwide โ€” Verified Google Reviews</h2>
            <p>โญ {{ $reviews['rating'] }} ({{ $reviews['total'] }} Google Reviews)</p>
        </div>

        <div class="reviews-carousel swiper-container">
            <div class="swiper-wrapper">
                @foreach($reviews['reviews'] as $review)
                    <div class="swiper-slide">
                        <div class="testimonial-card">
                            <h3>{{ $review['author'] }}</h3>
                            <span>{{ $review['time'] }}</span>
                            <div class="rating-box">
                                @for($i = 0; $i < $review['rating']; $i++)
                                    <i class="fa fa-star"></i>
                                @endfor
                            </div>
                            <p>{{ $review['text'] }}</p>
                        </div>
                    </div>
                @endforeach
            </div>
        </div>

        <div class="review-actions">
            <a href="{{ $googleReviewsUrl }}" class="btn btn-primary" target="_blank">See All Google Reviews</a>
            <a href="{{ $googleWriteUrl }}" class="btn btn-secondary" target="_blank">Write a Review</a>
        </div>
    </div>
</section>

โœ… Fully dynamic. โœ… Styled to match your theme. โœ… Trustworthy.


Clear Cache and Test

php artisan config:clear
php artisan cache:clear
php artisan view:clear

Reload your homepage. You should see your verified Google reviews beautifully displayed.


Extra Tips for Production

  • Limit API usage โ€“ Google Places API is paid after a free tier. Use caching (Cache::remember) wisely.
  • Secure API keys โ€“ Always restrict your API key to IP addresses.
  • Fallbacks โ€“ If the API fails, show a default message instead of breaking the layout.
  • Styling โ€“ Match your brand identity (colors, fonts, animations).

Bullet Points / Quick Takeaways

  • Google Reviews = trust + SEO boost
  • Use a Server Key for Laravel (not browser key)
  • Get your Place ID from Googleโ€™s Place Finder
  • Store credentials in .env securely
  • Cache responses to save API calls
  • Add โ€œSee All Reviewsโ€ and โ€œWrite a Reviewโ€ buttons for UX & trust

Call to Action (CTA)

๐Ÿš€ Ready to win more clients? Start integrating your Google Business Profile reviews into your Laravel site today. Itโ€™s one of the easiest, most powerful upgrades you can make for credibility and conversions.


Optional FAQ Section

Q: Is Google Places API free? A: Google offers a free tier with $200 monthly credits. Most small sites fit comfortably within this.

Q: Can I filter reviews (e.g., only 5-star)? A: Yes. You can filter reviews inside the service before sending them to your view.

Q: Do I need a Google Maps billing account? A: Yes, you must enable billing to use Places APIโ€”even if you stay under the free quota.

Q: Can reviews auto-update? A: Yes. With caching, you can refresh reviews every few hours without hitting API limits.


Share this post

Engr Mejba Ahmed

About the Author: Engr Mejba Ahmed

I'm Engr. Mejba Ahmed, a Software Engineer, Cybersecurity Engineer, and Cloud DevOps Engineer specializing in Laravel, Python, WordPress, cybersecurity, and cloud infrastructure. Passionate about innovation, AI, and automation.