Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel World

Laravel World Laravel Package

altwaireb/laravel-world

Laravel World provides a complete, ready-to-use database of countries, states, cities, currencies, languages, timezones, and more. It ships with migrations, seeders, models, caching, and multilingual support, so you can add geo data to any Laravel app in minutes.

View on GitHub
Deep Wiki
Context7

Laravel World adds a complete, self-hosted world database to Laravel: countries, states, cities, currencies, timezones, and languages. It includes migrations, seeders, Eloquent models, and relationships, making it easy to build address forms, geo selectors, and regional settings without relying on external APIs.

  • Countries, states, and cities with hierarchical relationships
  • Currencies, timezones, and languages ready to query
  • ISO codes, phone codes, and translations for localization
  • Seeders and migrations for fast setup
  • Eloquent models and scopes for clean integration
Frequently asked questions about Laravel World
How do I install laravel-world in a Laravel application?
Install with composer require altwaireb/laravel-world, then publish the package config and migrations, run php artisan migrate, and execute the provided seeder or console command to import the reference data. Service provider auto-discovery means little manual wiring is required. The main effort is data volume: expect the city seed to be the slowest step, so measure it in an isolated branch before production.
Does laravel-world support Laravel 11 and Laravel 12?
The package is positioned for Laravel 9 through 12 on PHP 8.x, but you should confirm the exact composer constraints in its composer.json before upgrading a platform. Framework coupling is a recurring risk because Laravel and PHP support can lag new majors. Check the package CI matrix to see which Laravel, PHP, and database combinations are actually tested.
Why is seeding the laravel-world cities table so slow?
City-level datasets in packages of this type commonly contain 100,000 to 150,000 or more rows, and building indexes on that table can lock or slow deploys. The integration risk is seed time, memory ceilings, and index-build locking rather than the code itself. Use a chunked seeding command if one is provided, run seeding as a controlled deployment step, and avoid a full re-seed on every CI run.
Does laravel-world include postal codes or latitude and longitude?
No. Laravel World is a reference-data provider for countries, states, cities, currencies, timezones, and languages; it is not a geo or address service and does not claim postal codes, latitude and longitude, geocoding, address validation, or administrative-boundary geometry. If you need those, ingest a dataset such as GeoNames directly or use a geocoding provider alongside this package.
Can I change the table names used by laravel-world?
The default table names countries, states, and cities are generic and can collide with existing application tables. Audit your schema before publishing migrations and check the published config for table prefix or rename support; config-driven renaming is the safest route. Doing this before the first migrate is much cheaper than renaming later.
Are laravel-world country and city IDs stable across updates?
This is a known risk. If downstream records foreign-key to these rows, a re-seed that renumbers IDs silently corrupts references. Verify whether the package documents stable primary keys and an incremental upgrade path versus a full re-seed; if not, store ISO codes or another natural key in your own tables and treat the package rows as replaceable lookup data.
What data source and license does laravel-world use?
The MIT license covers the package code, not necessarily the underlying dataset. If the data derives from GeoNames or a similar source, attribution obligations can propagate into your shipped product. Confirm the upstream source and its license before legal sign-off, and add the required attribution if needed.
How do I test with laravel-world in CI without seeding 150k cities?
Seed only a small subset or fixtures in CI rather than the full city table. The package local tables give deterministic tests, but a 100k-plus-row seed on every pipeline run is slow and can hit memory limits. Check for per-table enable or disable options or a chunked seeding command you can point at a test connection.
Is laravel-world actively maintained and what is the bus factor?
Adoption is modest at roughly 102 stars with a single-maintainer profile, so there is no SLA, vendor escalation path, or guaranteed release cadence. Treat it as a dependency you may need to fork and own, pin the version, and watch its Laravel compatibility. Budget time for data validation and possible maintenance rather than assuming community support.
What are alternatives to laravel-world for country, state, and city data in Laravel?
Alternatives include seeding your own tables from a dataset such as GeoNames, using another country, state, and city package with a stronger maintenance record, or calling a geo API for address-level needs. Compare licensing, ID stability, coverage depth, and update cadence before choosing. For non-Laravel stacks, ingesting the raw dataset directly is usually better than pulling in an Eloquent package.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager