Monday, May 7, 2012

cakephp part 2

after settle the installation; now its time to bake the cake. the fastest way is by using cmd.


now; i got an error.
"cake is not recognized as an internal or external command"

hence; the solution was:
follow this link/steps:
computer -> system properties -> advanced system setting ->environment variable -> for 'path'; paste this at the end of %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

;C:\wamp\www\cake\lib\Cake\Console;C:\wamp\bin\php\php5.3.10  (depend on version cake you download)

now, run the cmd again


done!
now choose which one you wanna bake first.

::Database Configuration::


::bake Model::


now, you can see the result using this link
localhost/cake/customers

::bake controller::


now you can see the error telling that there is no view
hence;

::bake View::
 
result

to remove the query below the page;
change the debug to 0

now

after that; edit the page at

app\webroot\css\cake.generic.css
app\View\Layouts\default.ctp
app\View\Users\index.ctp

to add image:
<?php echo $this->Html->image('cake_logo.png', array('alt' => 'CakePHP'))?>
<?php echo $this->Html->image('cake.jpg', array('width' => '200px'))?>