2. Getting started

Created Friday 29 August 2014

Overview

Contents of CakePHP Directory

Naming Controllers

Example

class ItemsController {
}

Naming Controller Functions

Example

class ItemsController extends AppController {
public function index() {
}
public function search() {
}
public function _countItems() {
}
}

Naming Views

Example

Naming Models

Example

class Item extends AppModel {
}

Naming Database Tables

Naming Database Table Fields

Naming When Joining Tables

Example

create table if not exists `items` (
`id` int(10) not null auto_increment,
`title` varchar(200) not null,
`year` int(4) not null,
`length` varchar(100) default null,
`description` text not null,
primary key (`id`)
) engine=InnodDB;

Help Wanted



Backlinks: