Astrotomic / laravel-translatable

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

GroupBy translation field #251

Closed bajki closed 2 years ago

bajki commented 2 years ago

Hi, how to groupBy translation field name and return only which have more than one in group.

So i have products and product_translations and i want to group it by name and return only with 2 or more so i can find duplicates.

Thanks, Ivan

github-actions[bot] commented 2 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

mahdi-above commented 6 months ago

Any update on this?

Gummibeer commented 6 months ago

Query the translations table, group by name, do the count and pluck the duplicate product IDs.