What is scaffolding?
Its something that you will find very useful in production apps. When you begin, you may want to throw up stuff real quick in order to get started. Ultimately, its a built in system for adding, editing, viewing and deleting your database records quickly.
Database table
Suppose we want to work with a table named users, and here is its SQL structure
- CREATE TABLE `users` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `username` varchar(50) NOT NULL,
- `name` varchar(50) NOT NULL,
- `email` varchar(96) NOT NULL,
- `password` varchar(50) NOT NULL,
- `updated` int(11) NOT NULL,
- `created` int(11) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `username` (`username`)
- )
Now lets create a controller and a model file for cakephp.


