Generate code with CakePHP’s cake bake command


In this tutorial I’ll show you in 25 minutes how to generate some basic CRUD functionality into your CakePHP website without writing a single line of code! This can be done by using the console which you get for free with CakePHP.
This is a great way to get up’n’running in minutes and start from what CakePHP has generated for you.

In this tutorial I’ll be covering

  1. Downloading CakePHP
  2. Creating database tables
  3. Generate Models based on database tables, controllers and views
  4. Setup the $PATH environment variable so you can call the cake command from everywhere on your system

Possible issue

If you get the following error while trying to bake your models

you have to symlink your mysql socket file in Terminal. Do the following in Terminal:

Let me know if you enjoyed it!

The tutorial

[ylwm_vimeo width=”610″ height=”342″]47293068[/ylwm_vimeo]