Upgrading | laravel-translatable-rust | Spatie       

 SPATIE  

laravel-translatable-rust
=========================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-translatable-rust](https://spatie.be/docs/laravel-translatable-rust/v1)  Upgrading

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-translatable-rust/v1) 

  Upgrading    
- [ Introduction ](https://spatie.be/docs/laravel-translatable-rust/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-translatable-rust/v1/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-translatable-rust/v1/requirements)
- [ Upgrading ](https://spatie.be/docs/laravel-translatable-rust/v1/upgrading)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-translatable-rust/v1/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-translatable-rust/v1/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-translatable-rust/v1/changelog)
- [ Testing ](https://spatie.be/docs/laravel-translatable-rust/v1/testing)
- [ About us ](https://spatie.be/docs/laravel-translatable-rust/v1/about-us)

Basic usage
-----------

- [ Getting and setting translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/getting-and-settings-translations)
- [ Removing translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/removing-translations)
- [ Replacing translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/replacing-translations)
- [ Querying translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/querying-translations)
- [ Validating translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/validating-translations)
- [ Handling missing translations ](https://spatie.be/docs/laravel-translatable-rust/v1/basic-usage/handling-missing-translations)

Advanced usage
--------------

- [ Available events ](https://spatie.be/docs/laravel-translatable-rust/v1/advanced-usage/available-events)
- [ Serializing translations ](https://spatie.be/docs/laravel-translatable-rust/v1/advanced-usage/customize-the-toarray-method)
- [ Usage with factories ](https://spatie.be/docs/laravel-translatable-rust/v1/advanced-usage/usage-with-factories)

 Upgrading
=========

The package depends on `laravel-rust` 0.1.0. Rust 1.99+ is required.

- Rename the Cargo dependency to `spatie-laravel-translatable`. The library import remains `spatie_translatable`.
- Register `service_provider()` instead of `TranslatableServiceProvider`. It preserves existing typed configuration and reads environment defaults when no section exists.
- Replace manual `Model` implementations and attribute bags with `#[laravel::model::model]` and typed `Json<Value>` columns.
- Implement `translation_attribute` and `translation_attribute_mut` for each JSON column instead of exposing a flattened attribute map.
- Drop the `events` argument from `translations`. Await setters and removals inside a real application scope. Register typed `Event<TranslationHasBeenSetEvent>` listeners.
- Replace `Models::save/find` with model create/update/find builders. Edit a clone, then submit its columns through the original model's typed update builder so change detection works.
- Apply scopes directly to the real model or table builder; they now consume and return it. Pass native comparison values such as strings or integers.
- `Comparison::Like` now explicitly means case-sensitive matching; use `LikeInsensitive` for the framework's default LIKE behavior.
- Configure `Translatable` with the real typed config/container. The framework has no locale subsystem; explicitly set this package's locale/fallback settings per application or request.
- Use application-approved language tags in query locales. The framework's path grammar cannot represent every arbitrary literal JSON key supported by the old stand-in.

Back up stored translations before changing the schema. Read and verify representative records before migrating production data.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
