Skip to content
Laravel Integration

Laravel + Google Maps Integration

Add maps, geocoding, and location features to your Laravel application with Google Maps API.

What You Can Build

Store Locators

Help customers find nearby locations with radius search and directions.

Delivery Routing

Optimize delivery routes and track driver locations in real-time.

Address Autocomplete

Help users enter valid addresses with real-time suggestions.

Geospatial Queries

Query by location with PostgreSQL PostGIS or Redis geospatial indexes.

Implementation

1. Get API Key

Create a project in Google Cloud Console and enable Maps, Routes, and Places APIs.

2. Install Package

composer require spatie/laravel-google-maps

3. Geocode Addresses

$location = GoogleMaps::load('geocoding')
  ->addAddress('123 Main St')
  ->get();