CakePHP model, view, and controller naming conventions
If we have a database with table named users, then following standard Cake PHP naming conventions should be used:
1. For Model
filename = User.php
classname = User
directory = app/models
2. For Controller
filename = Userscontroller.php
classname = UsersController
directory = app/controllers
Standard CakePHP controller actions/function() are:
index(), add(), edit() ,view(), delete()
3. For View
filename =index, add, edit, view (same name as the function name in the controller)
extension = .ctp (filename extension)
directory = app/views/users
View files corresponding to controller function with these names:
index.ctp, add.ctp, edit.ctp, view.ctp, delete.ctp
0 Comment(s)