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

Translatable For Laravel Laravel Package

roundly-consulting/translatable-for-laravel

A Laravel package that brings locale-aware translations to Eloquent models, letting you store and retrieve attribute values per language with fallback support. It simplifies building multilingual applications while staying close to Laravel conventions and reducing boilerplate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for multi-locale content. Confirms this is a mature "buy/adopt" candidate for the translation layer rather than a bespoke implementation: the maintainers are investing in static-analysis correctness (shipping a PHPStan extension via extra.phpstan.includes, auto-loaded by phpstan/extension-installer), which is the kind of polish you only get from a package that is being used in real CI pipelines.
  • Roadmap sequencing for localization. Because the schema macro $table->translatable(string $name): ColumnDefinition is now formally typed and analyzable, schema design and migration authoring can start in sprint 1 without waiting for a "translation architecture" spike. That de-risks committing to a locale rollout.
  • Quality-gate policy for CI. The fix means phpstan/larastan at level 5+ can run in package-development contexts (Testbench), in apps using dont-discover, and where providers are registered by hand. Product decision: adopt a "static analysis must cover migrations and schema macros" gate rather than excluding database/migrations from analysis — a common shortcut that hides real defects.
  • Adoption scope for monorepos and extracted packages. Supports a decision to reuse the same translatable abstraction in first-party packages (Testbench-tested) as in the host app, instead of maintaining two divergent patterns.
  • Feature vs. reliability trade-off. 1.1.2 ships no new user-facing features — it is purely developer-experience and tooling. Signals a stabilization phase, which is the right window to adopt and to deprioritize building competing internal tooling.

When to Consider This Package

  • Adopt when you have (or are about to have) user- or admin-editable content that must exist in more than one locale, you're on a supported Laravel version, and you want translation storage handled at the schema level via a translatable() column macro rather than hand-rolled JSON columns plus accessors.
  • Adopt when your team enforces static analysis. This release is specifically for you: it removes the "Call to an undefined method" false positive that otherwise forces teams to either blanket-ignore migrations in PHPStan or drop the macro. Include vendor/roundly-consulting/translatable-for-laravel/extension.neon if you don't use phpstan/extension-installer.
  • Adopt when you develop Laravel packages under Testbench or use dont-discover — this is precisely the gap 1.1.2 closes, and prior to it those environments silently degraded your analysis coverage.
  • Look elsewhere / defer when your localization needs are static (translation files only, no per-record translated content), when you require a full translation-management workflow (TMS integration, translator UI, approval states) — this is a persistence-layer concern, not a TMS — or when you're on an unsupported Laravel/PHP combination. Also reconsider if your team does not run PHPStan/Larastan: the headline value of 1.1.2 is invisible to you, though nothing here is a regression.
  • Risk check before adoption: confirm the package's supported Laravel/PHP matrix, the migration path for existing translated data, and whether the JSON/column storage shape fits your query and indexing needs (locale-scoped filtering and sorting are the usual friction points).

How to Pitch It (Stakeholders)

For executives: This is a small, focused patch (1.1.2) to an already-adopted-pattern library that manages translated content in the database. It contains no breaking changes and no new features — it fixes developer tooling so our automated code-quality checks can see the package's database schema helper. Net effect: fewer false alarms in CI, faster onboarding for engineers, and continued low cost of ownership. It supports our localization roadmap with no additional build investment.

For engineering: 1.1.2 adds a bundled PHPStan extension so Larastan understands the $table->translatable() schema macro even when the service provider isn't booted during analysis — Testbench-based package development, dont-discover apps, and manually registered providers. The extension is loaded automatically by phpstan/extension-installer through extra.phpstan.includes; without the installer, add vendor/roundly-consulting/translatable-for-laravel/extension.neon to your config. Action items: upgrade to 1.1.2, and if you previously excluded database/migrations from static analysis to work around the undefined-method error, re-include migrations and remove the exclusion, since that workaround was masking other potential issues. No application code changes required.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core