Reputation: 45
i need some help regarding using single category db table for all categories in my application. I want to have a single table which contains all type of categories.
And when creating a Post , i would like to display only Post Model related Categories and while creating a Page i would like to display only Page Related Categories for selection.
How can i achieve this?
Upvotes: 0
Views: 98
Reputation: 646
@Vivek Bora it is very simple just add type column in your categories table Ex: type = post or advertisement or anything that you want.
Upvotes: 2