Manage Locations. Normalize Geography. Reuse Address Data.
Laravel Location provides a structured, scalable way to model geographic data in Laravel: Countries, Provinces, Cities, Districts, Locations, Geo Areas, and Addresses.
It is built for real-world systems where location data is shared across multiple modules and must remain consistent, normalized, and queryable.
Why Laravel Location?
A clean hierarchy
Use a normalized hierarchy (Country → Province → City → District) and query it easily across your application.
Reusable “Location” records
Locations are stored as unique combinations of (country, province, city, district). The package uses firstOrCreate() to prevent duplicates and ensure referential integrity.
Polymorphic attachments
- Attach Addresses to any model via
HasAddress - Attach Geo Areas to any model via
HasGeoArea - Attach Locations as a single or multiple relation via
HasLocation
Service-first API (with Facades)
Work with a clean service layer using facades:
Country, Province, City, District, Location, GeoArea, Address.