Artisan commands
php artisan google-places:check # probe Places, Routes and Geocoding with your key
php artisan about # includes the package section: API key, cache, logging- google-places:check — sends one small request to each of the Places API (New), Routes API and Geocoding API and prints a table of API, status and detail. It exits non-zero if any API is unreachable or not enabled, so it works as a deploy gate. The key is masked to its last four characters — a key of eight characters or fewer is starred out completely.
- about — the package adds a section reporting whether the API key is SET or MISSING and whether cache and logging are ENABLED or OFF. The key itself is never printed.
The same check in code
The command is a thin console face over GooglePlaces::check(), which returns one ApiCheckResult (api, ok, detail) per API — ready for a health endpoint or a deploy gate. A Geocoding REQUEST_DENIED fails even though Google sends it with HTTP 200; probes are not retried, throttled or cached, and a missing key throws PlacesException::missingApiKey():
use RoundlyConsulting\GooglePlaces\DataTransferObjects\ApiCheckResult;
use RoundlyConsulting\GooglePlaces\Facades\GooglePlaces;
$down = array_filter(GooglePlaces::check(), fn (ApiCheckResult $r) => ! $r->ok);
foreach (GooglePlaces::check() as $result) {
$result->api; // 'Places API (New)' | 'Routes API' | 'Geocoding API'
$result->ok; // bool
$result->detail; // 'Reachable and authorized.' or the failure, key redacted
}Both call Google for real against a live key. The command resolves PlacesClient, so under GooglePlaces::fake() it reports the withCheck() seed instead — see Testing.
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.