- What is cheesegrits/filament-google-maps used for?
- It is a Filament plugin that adds Google Maps form fields, table columns, and dashboard widgets to Laravel admin panels. You can use it to pick coordinates, show markers, and render maps inside Filament resources without building a custom JavaScript integration. It fits back-office use cases like store locators, delivery zones, and asset geotagging.
- How do I install cheesegrits/filament-google-maps in a Laravel app?
- Install it with Composer, publish its config and assets, and add your Google Maps API key to the environment file. Add the package trait or interface to the model that stores coordinates, then use the field and column classes in your Filament resource schemas. Filament service provider auto-discovery should register the plugin, but verify the package docs for any panel registration step.
- Which Laravel and Filament versions does filament-google-maps support?
- The package is intended for Laravel 10+ and Filament v3 or v4 panels running Livewire 3, but Filament major releases are the most likely compatibility break point. Check the current composer.json constraints and test the exact versions in your panels before committing. Pin the package and Filament versions together.
- How do I configure the Google Maps API key for Filament Google Maps?
- You publish the package config, add a key to .env, and restrict that key in Google Cloud to the Maps JavaScript, Geocoding, and Places APIs you actually use. Use separate keys per environment and apply HTTP referrer or server restrictions. Because the JavaScript key is rendered client-side, unrestricted keys are a known billing abuse vector.
- What Google Maps APIs and billing costs should I expect?
- The package wraps the Google Maps JavaScript API for map rendering and makes server-side geocoding and Places calls for address lookup and reverse geocoding. Map loads and autocomplete or geocode requests bill per use, so cost scales with editor activity rather than public traffic. Set hard budget alerts and API restrictions in Google Cloud before production.
- Should I store latitude and longitude in separate columns or as JSON?
- Discrete decimal latitude and longitude columns are easier to index and query by bounding box, which matters for store locators and spatial filters. A JSON or GeoJSON column is easier to extend later to polygons and other geometry. Decide this explicitly and write your own migration rather than relying on any default column assumptions.
- Can I use filament-google-maps for a customer-facing public map?
- It is designed for authenticated Filament admin panels, not public-facing maps. The UI conventions, asset pipeline, and routing are built around the admin panel, so a public map should use the Google Maps SDK directly or an alternative like Leaflet with OpenStreetMap. Keep the package for back-office location picking and marker management.
- How do I test a Filament Google Maps field without hitting Google's API?
- Treat the map widget as a client-side component and test the surrounding Laravel behavior: model casting, validation of latitude and longitude, and schema rendering. Mock or fake the geocoding HTTP calls so tests do not consume billable Google requests. Filament and Livewire component tests can assert that the field appears and persists the expected coordinates.
- What are alternatives to cheesegrits/filament-google-maps?
- If Google Maps licensing or per-load SKU cost is a concern, consider Mapbox or a self-hosted Leaflet plus OpenStreetMap component. You can also build a bespoke Alpine and Livewire map field if you need full control over the UI and data flow. The package remains a good fit when you want a native Filament field, column, and widget with minimal setup.
- Is cheesegrits/filament-google-maps actively maintained?
- It is a small, single-maintainer package, so bus factor and Filament major-version coupling are real risks. Pin versions, verify compatibility before each Filament upgrade, and have a fallback plan to fork or replace it with a bespoke component. Review the repository release history and issue activity before adopting it.