- How do I install guiliredu/laravel-seed-migration-estados-cidades-brasil?
- Install it with Composer, then publish or auto-load the package migration and seeder and run php artisan migrate and php artisan db:seed. The package ships the estados and cidades tables and the Brazilian geographic reference data. On newer Laravel versions, verify migration loading and namespace conventions before committing, since the last release is from 2020.
- Does this package support Laravel 10 or Laravel 11?
- There is no official Laravel 10 or 11 support statement. The last release was November 2020, placing it in the Laravel 7 and 8 era. Its migrations generally still execute on Laravel 9, 10, and 11, but auto-discovery, namespace conventions, and PHP 8.1+ deprecations such as implicit nullable parameters must be validated. If you are on Laravel 10 or 11 with PHP 8.2+, treat it as verify before commit.
- What tables and columns does the package create?
- It creates two Portuguese-named tables, estados and cidades, and populates them with 27 states and roughly 5,570 municipalities. The package provides no configuration for table names, key types, or column shapes. You either adopt its schema as-is or fork and adapt it.
- Is the Brazilian state and city data up to date?
- The data is a 2020 snapshot. Brazilian municipality data is mostly stable, since no new municipalities have been created since 2013 and IBGE codes are durable, so it is usually fine for address selection. It is not sufficient for regulatory, fiscal, or IBGE-code-driven integrations where district or name changes matter. Validate the codes against the current IBGE list before relying on them downstream.
- How long does it take to seed all Brazilian cities?
- Seeding all roughly 5,570 municipalities has a real time cost and should be planned for. If your product only needs a curated subset, such as municipalities where you operate, adapt the seeder rather than importing everything. The package is reference data only and runs solely during migrate or db:seed.
- Can I customize the table names or schema?
- No, there is no configuration for table names, key types, or column shapes. The tables are estados and cidades, and you adopt the package opinion or fork it. If your address model uses different naming, bigIncrements versus increments, UUIDs, or soft deletes, copy the migration and seeder into your application and adapt them.
- Will it conflict with my existing address or location tables?
- Yes, if you already have estados or cidades tables, or a competing states and cities package, the schema will collide. There is no configuration to rename tables or change key types. For long-lived systems, the recommended path is to absorb the data into your own database/migrations and database/seeders rather than installing the package.
- Is this package maintained and safe for production?
- The package has 77 stars, a single maintainer, and its last release was in 2020, so there is effectively no upstream support path. Its runtime risk is low because it only ships migrations and seeders, but you should budget for owning a fork from day one. Copying the data into your application is the safer long-term choice.
- What are the alternatives to this package for Brazilian states and cities in Laravel?
- Alternatives include generating your own seeder from a current IBGE CSV, syncing from the IBGE API, or using another states and cities package. The right choice depends on whether you need the full municipality dataset and whether IBGE codes are required downstream. Copying the migration and seed data into your app avoids an abandoned dependency entirely.
- Can I use this package for address forms, shipping zones, or tax lookups?
- It fits Brazilian-facing Laravel monoliths that need address forms, location filters, shipping zones, or customer segmentation. It is a poor fit for APIs that only need a handful of locations, for multi-tenant setups where reference data must be per-tenant, and for non-Brazilian products. For fiscal or regulatory lookups, validate the 2020 IBGE codes against the current IBGE list first.