coding

CakePHP 2.x | Console | cake bake all | Windows + Linux

In CakePHP the “cake” (console) command can be used to bake scaffolding Model, View and Controller files (to quickly create content management system).

Following is the command
“cake bake all”

“cake” is the actual command.
“bake” and “all” are parameters (other options are available to selectively bake stuff – M/V/C).

“cake” is the Linux shell command.
It will not run on Windows, because it is a Linux shell command.

To run this on Windows you will need to use cake.php (available in the same folder – app/Console).

Since, by default, php path is not available in command line, so you will need to provide php path also.

So, the final command will be something like following:
(assuming, XAMPP is installed – and, you are already in c:\xampp\htdocs\cakeproject\app\Console)

c:\xampp\php\php.exe cake.php bake all

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s