- How do I install vanthao03596/laravel-hanhchinhvn?
- Install it with composer require vanthao03596/laravel-hanhchinhvn, then publish the package migrations and any config using artisan vendor:publish. Run php artisan migrate and then seed or import the administrative dataset. The mechanical install is straightforward, but the harder work is verifying dataset vintage and deciding whether your own models should foreign-key into vendor-owned tables.
- What Laravel and PHP versions does laravel-hanhchinhvn support?
- The last release was on 2022-03-04, so its composer.json plausibly caps at Laravel 8 or 9 and may block Laravel 10 through 12 without a fork. Check the composer constraints before adopting it in a modern application. If you need current Laravel support, expect to fork or vendor the code.
- Is the Vietnam administrative data in laravel-hanhchinhvn up to date?
- No, the last release was 2022-03-04. Vietnam has since completed commune-level mergers in 2023-2024 and moved to a two-tier province-plus-commune model in 2025, abolishing the district level and reducing roughly 63 provinces to 34 and about 10,000 communes to 3,300. A 2022 snapshot is structurally outdated, so verify the current legal state before designing your address schema.
- Does laravel-hanhchinhvn include provinces, districts, and wards models and migrations?
- The package is a Laravel wrapper around the province, district, and ward or commune hierarchy and is expected to ship Eloquent models for all three tiers, publishable migrations, and a seeder or import command. Relationship helpers map the hierarchy with hasMany and belongsTo. Confirm the actual contents of your installed version, since the repository has not been updated since 2022.
- Are the IDs in laravel-hanhchinhvn official GSO codes or package-local?
- That is unverified and is one of the key questions to resolve before committing. If primary keys are dataset-local rather than official GSO codes, every data refresh renumbers rows and breaks stored foreign keys. Check the migrations and seeders, and plan a mapping layer to GSO, logistics, and e-invoice tax codes.
- Can I use laravel-hanhchinhvn for address forms and checkout in production?
- Treat it as a reference dataset and schema pattern rather than a runtime dependency you bet your address model on. The three-tier model is architecturally sound but temporally poor because of the 2025 two-tier restructuring. For production, fork or vendor the dataset, control the identifiers, and keep your domain address entities decoupled from vendor-owned tables.
- How do I seed or import the Vietnam administrative division data?
- After publishing and running the migrations, seed the data using the package's seeder or import command as documented in the README. The technical review flags an open question about whether an update mechanism exists or the data is hard-coded in migrations and seeders. If the data is baked into migrations, refreshing the dataset means editing or forking the package.
- Does laravel-hanhchinhvn provide validation rules, search helpers, or form components?
- The evaluation describes it as a data bundle with an ORM veneer, so do not assume it ships validation rules, form components, or search helpers. The review explicitly asks whether it provides those or only models plus data. Vietnamese diacritics also require utf8mb4 and accent folding for matching user-typed addresses, which the package likely does not provide.
- Is laravel-hanhchinhvn still maintained, and what are the alternatives?
- It is effectively a single-maintainer project with around 39 stars and no release in more than three years, so assume zero upstream fixes. Alternatives include vendoring the dataset yourself, using a maintained Vietnam administrative data source, or building the tables from official GSO data. The recommended path is to fork the repo or vendor the dataset internally rather than depending on it at runtime.
- Is the MIT license on laravel-hanhchinhvn okay for the dataset?
- The code is MIT, but dataset licensing is often separate from code licensing and must be checked independently. Confirm the data provenance and that redistribution of the Vietnamese administrative division data is clean under your intended use. Do not assume the MIT code license covers the dataset.