I am using CakePHP friendsofcake's crud, I have two controllers UserController.php in /Admin and VendorsController.php in /Vendors. but these Both Controllers should use single Model CustomersTable.php.
Cake’s MVC setup exists for a reason. Each table has its own controller. Using relations, you can make sure they are linked to eachother and queries can look up related data.
All controllers should be in folder Controller. Otherwise, Cake will not work.
So you will need CustomerController as well. Note that another controller can still look up data directly in other tables, using
You should not use any of static calls you can find in cake’s code or book as at some point they will just vanish leaving you with code that needs to be refactored before you will be able to update framework to recent version.