- Is pugx/geo-form-bundle a Laravel package?
- No. It is a Symfony bundle (PUGXGeoFormBundle) that adds a map-based coordinate picker to a Symfony form field and hydrates bound latitude and longitude properties on submit. It ships no Laravel service provider, no publishable config, and no package auto-discovery. Treat it as reference material rather than a Composer dependency for a Laravel application.
- Can I install pugx/geo-form-bundle in a Laravel application?
- Not in any practical sense. The package targets the Symfony form component and its dependency graph, so Composer will typically refuse to resolve it against a modern Laravel install. Even if you forced it in, nothing would wire the form type extension or the front-end assets into Laravel's request lifecycle. The realistic outcome is a rewrite of the pattern, not an integration.
- What does PUGXGeoFormBundle actually do?
- It adds a geo form type extension that renders an interactive map next to a text or hidden field. A jQuery-based JavaScript asset draws a Google Map and writes the selected latitude and longitude back into the form inputs. On submit, the bound entity properties receive those coordinates. An optional geocoder service can resolve an address into coordinates.
- Which Laravel and PHP versions does pugx/geo-form-bundle support?
- None, because it is not a Laravel package. The codebase dates from the Symfony 2.7 to 3.x era, which implies PHP 5.6 and 7.x constraints and jQuery-era front-end assets. That conflicts with a modern PHP 8.x and Laravel 9 to 11 dependency graph. There is no maintained branch for current Laravel or Symfony 5 and 6 projects.
- How do I build a map-based coordinate picker in Laravel instead?
- Treat the repository as a specification rather than a dependency. In Laravel terms you would build a Blade or Livewire component that renders the map, a GeoPoint value object with a cast, a form request rule that validates latitude and longitude ranges, and a Geocoder contract bound to your provider of choice. Extracting the field contract from the bundle's form type extension gives you the input names and data shape you need. The work is measured in days, not hours, but you own the result.
- Does the bundle require a Google Maps API key and a billing account?
- Yes. The widget is a consumer of the Google Maps JavaScript API, so you need an API key, a billing-enabled Google Cloud project, and quota management. That operational dependency is considerably larger than the roughly 400 lines of code the package represents. If you already have Mapbox, Leaflet, or OpenStreetMap under contract, reusing that provider is usually the better call.
- Is pugx/geo-form-bundle still maintained and safe for production?
- Assume it is unmaintained. The repository shows around 15 stars and zero dependents, which means essentially no production validation and no downstream code exercising edge cases. There is no evidence of meaningful automated test coverage, so you would be validating behavior yourself. The security surface is low since there is no server-side execution beyond optional geocode HTTP calls, but the realistic failure mode is silent breakage rather than compromise.
- What license does pugx/geo-form-bundle use?
- It is released under the MIT license, which is permissive and imposes no legal blocker on commercial use. That is the one clean dimension of the package. If you fork or vendor any part of it, keep the copyright notice and attribution intact.
- How should I validate latitude and longitude in a Laravel form request?
- Use a form request with numeric rules and explicit bounds: latitude between -90 and 90 and longitude between -180 and 180, both required together. Reject one-sided pairs so you never persist a latitude without a longitude. A dedicated rule or a GeoPoint value object with a validation method keeps the check reusable across controllers and Livewire components. Server-side validation matters here because the coordinates are written client-side by JavaScript and can be tampered with.
- What are the alternatives if I need geocoding or reverse geocoding in Laravel?
- Pick a provider you already have under contract, such as Google, Mapbox, or a self-hosted Nominatim instance on OpenStreetMap tiles. Wrap it behind a Geocoder contract with a driver per provider so you can swap vendors without touching call sites. If privacy or cost rules out third-party egress, self-hosted tiles and a local geocoder avoid sending addresses off your infrastructure. For the map widget itself, Leaflet with an ES module script is a lightweight jQuery-free replacement for the bundle's front-end asset.