illuma-law / laravel-places-scout
A fluent Laravel package for interacting with the Google Places API with strongly typed DTOs.
v1.0.0
2026-10-23 13:32 UTC
Requires
- php: ^8.3
- illuminate/contracts: ^12.0 || ^13.0
- illuminate/database: ^12.0 || ^13.0
- illuminate/http: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
- spatie/laravel-package-tools: ^1.19
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.21
- mrpunyapal/peststan: ^0.2.12
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^10.1 || ^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.39
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-23 13:34:42 UTC
README
A Laravel client for Google Places Text Search and Place Details. Responses are returned as typed data objects.
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.
