Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Naming Conventions in CakePHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 241
    Comment on it

    If You are confused in CakePHP naming Conventions this blog helps you more to Understand about the Naming Conventions.

    All naming Convention Depends on your database table name which should be proper name.

    When Your are creating CakePHP Project you need to Manage file in these folders.

    Model
          dir- app/Model
    View
          dir-app/View
    
    Controller 
           dir- app/Controller
    

    While creating the file you will have to follow CakePHP naming Conventions.And its very Importent for PHP Developer to follow these standers.

    DataBase File Naming.

    Table Name must be lowercase & Plural.

    e.g- users,user_tables.
    

    Model File Naming

    Model class name are singular,CamelCase, usually this should be the database table name but in singular format.

      e.g - User,UserTable
    

    View File Naming

    View file names are function_name.ctp (The function name is the name of the function you have defined in your appropriate Controller file.

    e.g.- user_add.ctp,uesr_edit.ctp
    

    Controller File naming

    Controller file names are plural and CamelCase, and filenames also end with Controller.php.

    e.g - UsersController.php or UsertablesController.php
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: