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 Package

bkfdev/laravel-world

Laravel World bundles countries, states, cities, currencies and timezones as Eloquent models with migrations and seeders, so you can add location lookups, selects, validation and reference data to your Laravel app without external APIs.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Update with composer update and confirm the package version resolves to v3.0.5. Laravel package discovery should continue to register the service provider, but re-check bootstrap/cache/packages.php if behavior changes unexpectedly.
  • Look first at:
    • the package changelog entry for v3.0.5,
    • config/<package>.php (publish it if you have not already),
    • any published files under lang/vendor/<package>,
    • your application for usages of the package’s translation trait or trait-provided translation methods.
  • The first practical use case is translating model attributes or UI strings through the package’s explicit API. Start with one model or one small set of strings, verify the default and fallback locales, then expand.
  • Because v3.0.5 removes trait translations, treat the upgrade as a short migration: search your codebase for the removed trait, its methods, and any translation keys that referenced trait names before deploying.

Implementation Patterns

  • Prefer explicit translation calls over trait magic. Use the package’s documented API or Laravel’s __() / trans() helpers with package namespaces such as package::key.
  • If your models previously relied on the package’s translation trait, replace it with:
    • a small application-level trait or accessor that delegates to the package’s current API, or
    • direct translation calls in presenters, API resources, or Blade components.
  • Keep translation payloads in lang files or the package’s configured translation source. Do not put translation arrays back into traits as a workaround; that recreates the coupling the release removed.
  • For localized models, centralize locale resolution in middleware or a request-level helper, then pass the locale explicitly to translation accessors. This makes fallback behavior predictable in jobs, commands, and queued listeners.
  • When returning translated data from APIs, resolve translations in API resources rather than serializing raw model attributes. This keeps fallback and missing-key behavior consistent.
  • Add tests for:
    • a translated attribute in the default locale,
    • the same attribute in a secondary locale,
    • fallback behavior when a translation is missing,
    • any key that previously came from the removed trait translations.

Gotchas and Tips

  • v3.0.5 is a patch version, but removing trait translations can be breaking in practice. Audit for calls to the removed trait, trait methods, or trait-namespaced translation keys before rollout.
  • Published language files are not automatically updated by Composer. Diff or republish the package’s lang/vendor/<package> files after upgrading.
  • Clear caches after the update:
    • php artisan config:clear
    • php artisan cache:clear
    • php artisan view:clear
  • If you extended or aliased the removed trait, you may see “method not found” errors or silently missing translations. Search for the trait name, use ...Translations, and calls such as translate( or getTranslation( that were provided by it.
  • Missing translation keys often fall back to the key string rather than throwing. Test for the expected translated value, not just the absence of an exception.
  • Use the package’s config as the extension point for locale fallbacks and translation sources. For app-specific behavior, wrap the package API in a small service or trait owned by your application rather than modifying vendor files.
  • If you maintain custom loaders or cache translated payloads, invalidate those caches when locales or translation files change. Trait removal can leave stale cached entries that reference keys no longer shipped by the 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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource