简体   繁体   中英

WordPress Taxonomy Structure For Laravel

I am developing a taxonomy system (tags, categories, and attributes) with Laravel. Currently in my database I have the following tables, "terms", "term_relationships" and "products". The "term_relationships" table being the pivot table. However, with multiple taxonomies (eg categories, tags and attributes), how can I store the taxonomy names without getting them confused between categories, tags or attributes. I see that WordPress uses a 4th table named "term_taxonomy", however I am unsure of how the 4 tables relate to each other.

Would someone be so kind as to enlighten me on this subject providing the best solution to implement such a taxonomy system.

Thank you.

如果这有帮助,我创建了这个包: https : //github.com/codiiv/laravel-taxonomies ,它基于 Wrordpress 中的 3 个表结构,但我将它们组合成一个表!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM