arthurydalgo/laravel-iso-countries
Laravel package (fork) providing ISO 3166 countries, ISO 639 languages, and ISO 4217 currencies via ready-to-use models backed by a bundled SQLite database. Includes localized names and relationships (countries↔languages/currencies). Supports Laravel 11/12, PHP 8+.
Pros:
spatie/laravel-translatable for localized names, aligning with globalized applications.Country::find('LU')->languages) simplify complex queries.Currency cast) for seamless integration with existing models.Cons:
illuminate/contracts, illuminate/database).spatie/laravel-translatable (for localization).countries, languages, or currencies tables.app.locale; ensure consistency with your app’s localization strategy.Currency::find('EUR')->countries) could impact performance if not optimized..gitignore in dev, use shared storage in prod).Country::all()) or use Laravel’s query caching.en, de, fr, es) sufficient, or are additional languages needed? If so, how will translations be managed?laravel-countries, michiellis/iso-3166) to justify this choice?spatie/laravel-translatable version).composer require arthurydalgo/laravel-iso-countries).php artisan vendor:publish --tag=config) to adjust locales or SQLite path..gitignore to include database/iso-countries.sqlite if needed.php artisan db:seed countries:build) to ensure latest data.Country::count() matches expected ISO 3166 entries).if ($countryCode === 'US')) with model queries (e.g., Country::find('US')->name).Country::find('BR')->currencies) to avoid manual joins.protected $casts = ['currency' => Currency::class]).sqlite3 CLI or Laravel migrations.app.locale and app.fallback_locale are set correctly in config/app.php.app()->setLocale('ja') with no Japanese translations).User::find($id)->country->name).spatie/laravel-translatable or Laravel core.config/iso-countries.php and rebuild the database.DB::enableQueryLog()) to identify bottlenecks.tap() for model inspection).with() for eager loading relationships").How can I help you explore Laravel packages today?