Answer the question
In order to leave comments, you need to log in
How to make categories for different entities in laravel?
Hello. Can you tell me how you can make categories for different sections of the site? For example, there are sections of articles, videos and news. It is necessary that each of them have categories. I have 2 ideas.
1) Make separate tables video_category, articles_category for example, which will contain categories and link section tables to them.
2) Or make 1 table and a polymorphic relationship with other entities.
Advise how best to do and which approach would be correct and why.. Are there any other smarter options?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question