Hello, For beginning, I have a table that contains post nouveautes then the categories and sub categories.
For example, a number of sub categories able to have several categories and sub categories be able to have multiple categories.
(literature*) -> Reviews -> Folder -> Chronic
(Cinema*) -> Reviews -> Folder -> Chronic
(music*) -> Reviews -> Folder -> Chronic
I want a post belong to categories and sub categories.
I thought to make a many to many between categories and sub categories and then put a category_id subcategory_id in the post table.
Is this correct and / or optimized?
Please sign in or create an account to participate in this conversation.
Reply to
Use Markdown with GitHub-flavored code blocks.
There's no shortage of content at Laracasts. In fact, you could watch nonstop for days upon days, and still not see everything!
Get Started
Laravel, categories and subcategories
Hello, For beginning, I have a table that contains post nouveautes then the categories and sub categories.
For example, a number of sub categories able to have several categories and sub categories be able to have multiple categories.
(literature*) -> Reviews -> Folder -> Chronic
(Cinema*) -> Reviews -> Folder -> Chronic
(music*) -> Reviews -> Folder -> Chronic
I want a post belong to categories and sub categories.
I thought to make a many to many between categories and sub categories and then put a category_id subcategory_id in the post table.
Is this correct and / or optimized?