Description
Google adds Google-related settings, geocoding helpers, Places review access, and a reCAPTCHA validation rule for Laravel Enso.
The package stores a single settings record, supports environment overrides for analytics, ads, maps, places, geocoding, and reCAPTCHA keys, exposes settings endpoints under the Integrations area, and includes a manual upgrade helper for moving legacy table columns toward environment-based configuration.
It is a lightweight integration package rather than a full Google SDK wrapper.
Installation
Install the package:
composer require laravel-enso/google
Run the package migrations:
php artisan migrate
Optional publish:
php artisan vendor:publish --tag=google-config
Features
- Settings record for Google integration keys and IDs.
- Settings endpoints under
integrations.google.settings. - Geocoding and Places helper services.
- Invokable reCAPTCHA validation rule backed by the configured secret.
- Manual upgrade helper for deprecating old database columns.
Usage
Resolve current runtime settings through the settings model:
use LaravelEnso\Google\Models\Settings;
$mapsKey = Settings::mapsKey();
$placesKey = Settings::placesKey();
$recaptchaKey = Settings::recaptchaKey();
Use the validation rule:
use LaravelEnso\Google\Validation\Recaptcha;
API
HTTP routes
GET api/integrations/google/settingsPATCH api/integrations/google/settings/{settings}
Services
LaravelEnso\\Google\\APIs\\GeocodingLaravelEnso\\Google\\APIs\\ReviewsLaravelEnso\\Google\\Validation\\Recaptcha
Depends On
Required Enso packages:
Companion frontend package:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!