- How do I install fahiem/filament-pinpoint in a Laravel Filament app?
- Run composer require fahiem/filament-pinpoint, optionally publish the config, then add a Pinpoint field to your Filament form schema. For Google you set GOOGLE_MAPS_API_KEY with the Maps JavaScript, Places and Geocoding APIs enabled; for Leaflet you set PINPOINT_PROVIDER=leaflet and need no key at all. Requirements are PHP 8.1+, Laravel 10 to 12, and Filament 4 or 5, so it drops into a current app with no service provider wiring.
- Does Filament Pinpoint work with Leaflet and OpenStreetMap without a Google API key?
- Yes. Google Maps is the default provider and requires an API key, while the Leaflet/OpenStreetMap provider needs no key. Set PINPOINT_PROVIDER=leaflet in your .env to change the default, or call provider('leaflet') on a single field instance. Your field code stays the same either way, which gives you a cost and vendor-risk escape hatch without rewriting your schema.
- Which Laravel and Filament versions does fahiem/filament-pinpoint support?
- The package requires PHP 8.1+, Laravel 10, 11 or 12, and Filament 4.0+ or 5.0+. Supporting two Filament majors is good for adoption today, but the package effectively gates your Filament upgrades, so check its release notes before moving to a new major. Pin the version in composer.json and add the upgrade check to your maintenance calendar.
- Which database columns does the Pinpoint field need for latitude and longitude?
- The field is a UI widget, not a model, so it writes into sibling form fields and ships no migrations. You point it at your existing columns with methods like latField(), lngField(), addressField() and provinceField(). A common setup is decimal(10,7) for lat and lng plus string or text columns for the address parts, added in your own migration.
- Can I use Pinpoint inside a Filament Repeater for multiple branch locations?
- Yes, repeater support is included, so you can capture a list of branch locations in a single form. The one scenario worth testing yourself is field-path resolution when repeaters are nested two or more levels deep, since that is the least proven path. Save, reload and edit a record in your real schema before relying on it in production.
- Is there an infolist entry to show saved locations on a map?
- Yes, the package provides a PinpointEntry for Filament infolists, including multi-pin display so several saved locations can appear on one map. That covers the common show-all-branches view without a custom build. It is a read-only display widget, so distance calculations, clustering and routing still belong in your own domain layer.
- Does the Pinpoint field allow submitting null coordinates if the map fails to load?
- Do not rely on the widget to enforce coordinates: add required, numeric and between rules on your lat and lng fields server-side. A missing or invalid Google key typically produces a blank map while the form still submits with null coordinates, which is the most likely production incident with this package. Validation in your form request is the cheap mitigation.
- How do I control Google Maps billing costs with Places Autocomplete and reverse geocoding?
- Places Autocomplete, Geocoding and map loads are billed per call, and reverse geocoding fired on every marker drag can add up quickly. Restrict the browser key by HTTP referrer and enabled APIs, then set quota caps and budget alerts in the Google Cloud console. Check whether your autocomplete flow uses session tokens for session-based pricing, and throttle or disable reverse geocoding on drag if traffic is high.
- Is the Leaflet and Nominatim provider safe to use in production?
- Nominatim's usage policy limits you to roughly one request per second, requires an identifiable User-Agent and attribution, and forbids bulk geocoding. A Leaflet setup that works fine in development can get your egress IP blocked in production, and the failure is silent rather than loud. For real traffic, point reverse geocoding at your own paid provider or a self-hosted instance behind the same field.
- Is fahiem/filament-pinpoint actively maintained, and what are the alternatives if it is abandoned?
- It has a single maintainer and a small install base, so treat maintainership tail risk as real; the MIT license means you can fork it, but you are implicitly accepting that upkeep. The upside is that it is purely a presentation-layer field with no migrations or service-provider magic, so removing or replacing it is cheap. If you later need a customer-facing store locator or distance queries, plan on custom front-end work or building on the same underlying map libraries.