over 7 years ago
Naming convention in cakephp
To get Maximum advantages from Cakephp then we need to follow some basic naming convention that cakephp rules says.
Naming convention follows principles of following section of cakephp
Naming convention of Controller file in cakephp
In cakephp the controller file always follows plural naming convention.
If a table name is orders in your database,then your controller file name should written like this
Then the Class name should be written like this
Tips: our table name is order , but at the time of naming the class name ,i have written it as Orders .
So always keep your table name plural (optional) and lower case.but always starts the class name as Upper case
like in OrdersController class ,the first letter O is capital but in my database the first letter was lower case.
At the timing of naming the class ,we should attach the name Controller to the table name,
like i have attached the word Controller to Orders ,so it becomes OrdersController.
If a table name is users in your database,then your controller file name should written like this
So from above 2 case we found that what ever the table name,our controller file name should contain a S following singular name.
Then the class name will be
If your database table consist of two words like following example
suppose the table name is user_profile , then the controller name would be
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2021 FindNerd.com. All rights reserved.
Sign up using