cviebrock / eloquent-taggable

Easily add the ability to tag your Eloquent models in Laravel.
MIT License
559 stars 72 forks source link

laravel-translatable vs eloquent-taggable #100

Closed badrshs closed 4 years ago

badrshs commented 5 years ago

Hi , how i can use this package with https://github.com/dimsav/laravel-translatable ?? i have two model 1 - Post 2-PostTranslation and im using laravel-translatable what i did is adding taggable to my Post model , but when i save the post it will work on the base model (Post ) ,so the tags will appear for all the records of translation , i can't add taggable for each locale

any help please or suggestion ?


class Posts extends Model
{
    use Taggable;
    use Translatable;
    public $translatedAttributes  = ['title','contain','detail'];
    public $fillable  = ['slug','image','category_id'];

}
cviebrock commented 5 years ago

I haven't used that other package, so I'm not sure how it operates under-the-hood. I suspect if it has different models for each translation, each of those would need to be taggable as well?

cviebrock commented 4 years ago

Closing due to no response. Feel free to re-open or comment if you are still having issues.