Generate a controller with Bake CakePHP


show more Generating a controller with Bake provides you with in-depth training on Developer. Taught by Jon Peck as part of the Up and Running with CakePHP show less
please wait ...

Generating a controller with Bake

I'm going to use the console and the Cake utility to generate the controllers for my models. Cake, bake, controller. Similar to model generation, bake will scan the database for tables to generate controllers for. Let's start with publications, so type 2. The next question will be for interactive controller generation. Yes, I'd like to see all the questions. Would I like to use dynamic scaffolding? What's that? Dynamic scaffolding means that CakePHP will generate code on the fly based on the current contents of the database, rather than writing it to files.

This is much slower, but gives a lot of flexibility during active development. I'm going to say no, let's write the methods to the controller. Next is the basic class methods. Index, which generates a list, add, view and edit. Yes, please. This is massively time saving, and we'll be looking at these in depth. Admin routing basically sets up a section of the site where a privileged user can administer content. As user manage...

Generating a controller with Bake
Video duration: 4m 59s 1h 40m Intermediate

Viewers:

Generating a controller with Bake provides you with in-depth training on Developer. Taught by Jon Peck as part of the Up and Running with CakePHP

Subject:
Developer
Software:
PHP CakePHP
Author:
please wait ...