Closed PitchRE closed 2 years ago
translate()
returns the translation model instance - which will be ja_JP
as requested.
If you want to use the property fallback you should use $item->slug
- these will use the property fallback as you request a specific model attribute.
Thank you for clarification. So I guess there is no way to make use of property fallback feature without changing locale globally in the app?
You can also pass the locale as part of the attribute $post->{'title:de'}
.
https://docs.astrotomic.info/laravel-translatable/usage/attributes
As title;
Config
Code
Output
I excepted 'slug' and 'description' property to not be null.
$item->getTranslationsArray() outputs
What do I do incorrectly?