Search by

illuma-law / laravel-places-scout

miguelenes

A fluent Laravel package for interacting with the Google Places API with strongly typed DTOs.

Package info

github.com/eloquage/laravel-places-scout

pkg:composer/illuma-law/laravel-places-scout

Statistics

Installs: 63

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v1.0.0 2026-10-23 13:32 UTC

README

Laravel Places Scout package banner

A Laravel client for Google Places Text Search and Place Details. Responses are returned as typed data objects.

Tests Latest Version License

Requires PHP 8.3+ and Laravel 12 or 13.

Install

composer require illuma-law/laravel-places-scout
php artisan vendor:publish --tag=places-scout-config

Set your Google Places API key in .env:

GOOGLE_PLACES_API_KEY=your-api-key

Search for places

use IllumaLaw\PlacesScout\Facades\PlacesScout;

$response = PlacesScout::textSearch('coffee shops in Lisbon');

foreach ($response?->results ?? [] as $place) {
    echo $place->name;
    echo $place->formattedAddress;
}

Get place details

$place = PlacesScout::getPlaceDetails('ChIJ...');

if ($place !== null) {
    echo $place->name;
    echo $place->website;
}

Both methods return null when the Google API request fails. You can pass withApiKey($key) before either method to use a per-request key.

Tests

composer test
composer analyse
composer format -- --test

License

MIT. See LICENSE.md.