Not sure what you mean exactly since you didn't gave much data on what exactly yon need help with, but it looks like what you need is a Polymorphic relationship. Check the docs to see if this is what you wanted.
Dec 3, 2017
8
Level 1
3 category tables with same structure, how to manager them with one Controller, Model, and view etc at admin?
same structure:
categories for posts
categories2 for businesses
categories3 for profile
How to manager(add, edit) them with one Controller, Model, and view etc at admin? thanks for any help
Is it possible to change table name with one Controller, Model, and view etc at admin?
Like ---------------- PHP code
switch (expression ) {
case categories1:
$table = 'categories1' ;
break;
case categories2:
$table = 'categories2' ;
break;
case categories3:
$table = 'categories3' ;
break;
.........
default;
$table = 'categories' ;
}
Please or to participate in this conversation.