Astrotomic / laravel-translatable

A Laravel package for multilingual models
https://docs.astrotomic.info/laravel-translatable/
MIT License
1.23k stars 157 forks source link

How can I iterate through translation attributes of model in a view? #202

Closed ekcltfrm closed 3 years ago

ekcltfrm commented 3 years ago

Hello all, I am trying to automate my form creation for translation entering. I need to iterate through the translated attributes of my model in my view. How can i get access to that?

$model->translationAttributes , $model->gettranslationAttributes both returns null.

Gummibeer commented 3 years ago

Hey, the $translatedAttributes property is protected and there's no method to get it. So the easiest would be to add your own method that returns $this->translatedAttributes.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days