Astrotomic / laravel-translatable

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

Translatable.php setAttribute() for attribute casting #234

Closed Briareos17 closed 3 years ago

Briareos17 commented 3 years ago

Translatable.php setAttribute() instead of $attribute prop assign in order to use translation model casts

Gummibeer commented 3 years ago

Hey, thanks for your PR but $attribute is the name of the attribute as string so we aren't filling $model->attributes directly but assigning the value to the overloaded property (for example like $model->title). So it is using the model casting already and there's nothing to fix.