creativeorange/laravel-translatable-and-injectable
Add translatable attributes to Laravel Eloquent models and inject dynamic values into translation strings at runtime, so locale-aware text can include model data, placeholders, or custom variables without hardcoding.
Package: creativeorange/laravel-translatable-and-injectable — a Laravel package providing Eloquent traits for translated attributes and automatic injection of related/translated records onto models.
What actually changed in v3.0.1: A single merged PR (Update composer.json) with no source, test, or API changes. This is a metadata-only patch release. In practice this almost always means a dependency-constraint adjustment (Laravel framework, illuminate/*, PHP version, or a dev-tool bump in require-dev) rather than a behavioral change. The v3.0.0 → v3.0.1 delta carries no migration burden for consumers, but it also carries very little signal about project health.
Architecture fit: The package is a thin trait layer over Eloquent. That is architecturally cheap — no service container gymnastics, no custom query builder, no middleware — but it is also the kind of package that reaches into model lifecycle hooks (getAttribute, __get, relation resolution), which is where "thin" packages quietly become load-bearing. Fit is good for small-to-mid Laravel apps with 2–5 locales; fit degrades in apps with heavy read replicas, aggressive caching, or API resources that already normalise locale fallback themselves.
Integration feasibility: High. Composer install, publish config (if any), add traits to models. Typical effort is hours, not days, for a first vertical slice.
Technical risk:
Key questions to the maintainers before adoption:
composer.json (constraint floors/ceilings, PHP version), and does 3.0.1 restore installability that 3.0.0 lacked?$with, eager loading, and toArray()/API resources?Stack fit: Assumes Laravel 9/10/11-class Eloquent. It complements rather than competes with spatie/laravel-translatable — validate whether it can coexist with (or should replace) whatever translation storage you already use. If you already run Spatie's package or store translations in JSON columns, confirm there is no trait collision on getAttribute/setAttribute.
Migration path:
^3.0.1 in a scratch branch; do not let 3.0.0 be resolvable in production.Compatibility checks: Run composer why-not against your locked Laravel and PHP versions; confirm the new constraint doesn't silently downgrade a shared transitive dependency. Check php -l/Larastan output on the first trait-bearing model to catch signature conflicts.
Sequencing: This package is a leaf dependency — schedule it after the Laravel major upgrade lands, not during it. Doing both simultaneously makes it impossible to attribute a regression to framework or to this package.
Decision: Adopt for a pilot. Treat 3.0.1 as "3.0.0 with fixed metadata," not as a maintained stable line, until a second substantive release or an active issue-response pattern is observed.
Maintenance: Low code surface, so maintenance is mostly constraint drift. Budget one review per Laravel major. The real cost is knowledge concentration: whoever wires up the traits owns them, and the "injectable" behaviour is invisible to a reader of the model class.
Support: No vendor. Escalation path is GitHub issues on a low-traffic repo, or a fork. For a package touching model attribute resolution, assume you may need to patch it yourself. Confirm your team has a named owner comfortable with Eloquent internals.
Scaling: Traits add per-model overhead on hydration and attribute access. This is negligible at typical page workloads and measurable only in bulk export/reporting paths that hydrate tens of thousands of records. If you have such paths, benchmark them explicitly and consider bypassing the trait with raw query builder there.
Failure modes to monitor:
*.Ramp-up: Half a day for a mid-level Laravel developer to be productive; roughly two days to be confident enough to debug trait-level issues. Required reading: the package README plus your own models' trait usage. Add a short internal note documenting which models use these traits and why — the next developer will not find it by reading the model files.
Recommendation: Proceed to a scoped pilot. Do not treat v3.0.1 as evidence of active maintenance; it is a metadata correction. Set a review checkpoint in two quarters: if no substantive commits and no CI/test visibility by then, plan to vendor the traits into your own codebase (they are small) to remove the dependency risk.
How can I help you explore Laravel packages today?