inventory-application
inventory-application copied to clipboard
How to add Category of product under add product.?
You have made product category filed as 'select' because of which I am to able to add category to my product at the time of creating the new product. Please help with this.! @moelashmawy
Go to the "controllers" folder. Next go to "userController". Under "newUser" instance you can see as an argument an object has been passed. In the object, you can see a key, named "isAdmin". Change that boolean value into 'true' and then go to the website and register a new user. That user will automatically become an Admin. After that remember you should change that boolean value again into 'false' otherwise all the users will become admins.
As an admin, you can add product categories from the dashboard.
You have made product category filed as 'select' because of which I am to able to add category to my product at the time of creating the new product. Please help with this.! @moelashmawy
please see @mastrmind-dev comment, i know it's not the best practice and not secure to do so but that's how it's done in this project!