mauricewijnia/nova-maps-address
A Laravel Nova field that adds a map-based address input to your admin panels, letting users search, select, and store addresses along with coordinates. It brings map autocomplete and geocoding into Nova forms so location data stays accurate and easy to edit.
composer require mauricewijnia/nova-maps-address
vendor:publish and pick the package):
php artisan vendor:publish --provider="Mauricewijnia\NovaMapsAddress\NovaMapsAddressServiceProvider"
.env / config/nova-maps-address.php (the config file ships with the key name; typically NOVA_MAPS_ADDRESS_KEY, populated into the field on boot).Customer or Order billing/shipping address:
use Mauricewijnia\NovaMapsAddress\Nova\MapsAddress;
public function fields(NovaRequest $request)
{
return [
MapsAddress::make('Address'),
// ...
];
}
The field renders a text input backed by Google Places autocomplete, so typing surfaces suggestions and selecting one fills the stored string. That's the whole happy path — no custom JS required.string column on the model. The field's value is the formatted address string returned by Places, so keep the column TEXT/VARCHAR(255) and mark it nullable unless the address is mandatory.->withCoordinates()) and provide matching columns on the model. Verify the exact option name against the README for your major version — option names have changed between 1.x and 2.x.->countries(['nl','be'])). Use these to avoid users selecting "restaurants" when they need a postal address, and to keep your Places billing focused.required and a regex/lookup check). Don't rely on the front-end autocomplete as validation.->displayUsing() to render one line.Number fields if you want users to tweak coordinates after the address is picked.composer update mauricewijnia/nova-maps-address
php artisan nova:publish
php artisan view:clear && php artisan config:clear
Treat 2.0.0 as effectively unusable; pin ^2.0.1.php artisan config:cache after changing the key; a stale cached config is the most common cause of "no suggestions / 403" reports.RefererNotAllowedMapError / ApiNotActivatedMapError and confirm the enabled APIs in Google Cloud before touching package config.nova:publish (or that caches an old public/vendor/nova) will show the field without JS.MapsAddress::make(...) chain compiles identically.How can I help you explore Laravel packages today?