- How do I install nnjeim/world in a Laravel app?
- Install it with composer require nnjeim/world, then run php artisan world:install for the automated publish-config, migrate, and seed flow. Manual installation is also supported in three steps if you prefer to control each stage. Optionally set WORLD_DB_CONNECTION before migrating if you want the package tables on a separate database connection.
- Does nnjeim/world provide IP geolocation?
- Yes. Version 1.1.38 adds an IP geolocation module exposed as World::geolocate() and GET /api/geolocate, with automatic fallback to a free API. The fallback uses ip-api.com in the request path, which is synchronous and rate-limited to 45 requests per minute. For production, disable the fallback and use a local GeoLite2 database instead.
- Can I store nnjeim/world tables on a separate database connection?
- Yes, the WORLD_DB_CONNECTION environment variable lets you isolate the package tables on a separate connection rather than polluting the primary schema. This is described as the most important architectural lever for adoption. Before relying on it, verify that Eloquent relationships between Country, State, and City models resolve correctly across connections, since cross-connection relations are a known sharp edge.
- Which Laravel and PHP versions does nnjeim/world support?
- The provided README excerpt and evaluation do not state exact Laravel or PHP version constraints. The evaluation flags this as a question for the maintainer spike and recommends checking composer.json and Packagist before adoption. Confirm the constraints are enforced in composer.json and test against your target Laravel version.
- Are nnjeim/world API routes registered automatically?
- Yes, the package auto-registers API routes under a configurable prefix. The evaluation warns that without hardening they may expose country and city enumeration plus a geolocation endpoint publicly, so prefix and middleware must be configured rather than assumed. It also recommends asking whether the package can run facade-only without registering routes.
- Is the nnjeim/world seeder idempotent?
- Seeder idempotency is not documented in the provided context. The evaluation specifically asks whether WorldSeeder uses truncate or upsert and warns that duplicate rows could corrupt joins across dependent features. Verify re-seeding behavior before scheduling data refreshes.
- What reference data is included in nnjeim/world?
- The package provides countries, states, cities, timezones, currencies, languages, and IP geolocation data. You can access it through the World facade or the built-in API routes. City IDs in the 147k+ range indicate a large seed, so plan for database size and seed duration.
- How big is the nnjeim/world seed and will it slow installation?
- The context notes city IDs in the 147k+ range, which implies a large seed dataset. Budget for seed duration and database size from the start instead of discovering it in staging. The automated world:install command wraps publish-config, migrate, and seed, so installation time will be dominated by seeding.
- What are the production risks of nnjeim/world IP geolocation?
- The main high-severity risk is the synchronous ip-api.com fallback in the request path, which has a 45 requests per minute cap and an example latency around 690 ms. Disable the fallback in production and require a local GeoLite2 database. GeoLite2 also carries MaxMind licensing and attribution obligations separate from the package's MIT license, so legal review is needed.
- Is nnjeim/world actively maintained and safe to depend on?
- The evaluation describes it as a low-risk, narrow-scope data utility rather than an architectural dependency, with a small code surface, MIT license, and easy forkability. However, about 999 stars and 0 dependents is a weak ecosystem signal, and single-maintainer risk is real. The listed release date also appears inconsistent, so confirm actual Packagist cadence, test coverage, and CI status before adoption.