bipin
2954
8
Laravel

how to create model for category subcategory and product

Posted 2 years ago by bipin

i have table category,subccategory and product & i want to achieve like this

1. mobile & accesory(category)
          -mobile(subcategory)
                    -iphone(product)

2.electronics(category)
          -laptops(subcategory)
                   -hp(product)

i want to send all table detail like categoryid,categoryname , subcategoryid, subcategoryname, productid, productname from controller to view so that i cant fetch all these detail in hierarchical way like above mention

i don't know how to create model and controller for these type of situation please help me guys if any video or refrence it will be great thanks in advance

Please sign in or create an account to participate in this conversation.