Dev

29
Jun 07

Shell in CakePHP

Just noticed that the cakephp guys added a shell feature like in ruby on rails in their newest alpha builds. Using and setting up this console on my windows pc was rather easy – the cakephp website even offers a screencast on this topic.

After doing the steps described in the screencast you can start the shell in your comand line with “cake”. Creating a new project is as easy: create a new folder (your project folder) in the cake root and change the directory tho this folder in the shell. Then simply type “cake bake” and let the magic begin.

More advanced stuff you can do with the cake shell: Type
cake bake controller SomeControllerName scaffold
This comand will create the controller with the apropriate name plus all edit, delete, index actions with default code. Adding “admin” also the admin edit delete, index actions are created automatically. Viceversa this comand also works for the view: cake bake view SomeViewName

Although the previous used solution with php scripts (indeed the shell is just a wrapper for them) was a practicable solution the shell looks more pro to me.

Kategorien: Dev | Schreibe einen Kommentar

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert

*


More in Dev
Mindstorm Alpha

Last few days I have been working on a new small web applikation which is called mindstorm (hopefully lego won't...

Multiple Tag Typeahead

Autocomplete or Typeahead is one of the most common Ajax Patterns. For my example I am using the script aculo...

Close