This document is for a version of CakePHP that is no longer supported. Please upgrade to a newer release!

Welcome

Warning

This version of the documentation is for CakePHP 2.x. Go here for the CakePHP 3.x documentation.

The CakePHP cookbook is an openly developed and community editable documentation project. We hope to maintain a high level of quality, validity and accuracy for the documentation. Notice the “Improve this Doc” button in the upper right-hand corner; it will direct you to the GitHub online editor of the active page, allowing you to easily contribute any additions, deletions, or corrections to the documentation.

Read the Book Anywhere

_images/read-the-book.jpg

Enjoy the CakePHP cookbook almost anywhere. Available as both a PDF and EPUB, you can now read it on more devices, as well as offline.

Getting Started

Build a Blog

Get started with the blog tutorial. You’ll learn the basics of CakePHP, and build a basic blog in the process.

Conventions

Learn about a typical CakePHP request and the conventions that power CakePHP.

Controllers

Controllers handle requests and help co-ordinate and prepare responses for the client. Read more about Controllers.

Views

Views are the presentation layer in CakePHP. They convert the data fetched from Models into the output format requested by the client. Read more about Views.

Models

Models are the heart of your application. They handle the validation, storage and retrieval of your data. Read more about Models.

Getting Help

If you’re stuck, there are a number of places you can get help.