Edit the controller
and see the output.. well it’s kinda fun
a little..
<?php
class ProductsController extends AppController
{
var $name = “Products”;
function index() {
$Data = $this->Product->find(‘all’);
$this->set(‘Data’, $Data);
}}
?>
** fun changing.. **
when i change ProductsController into something else it’s produce error
Error: ProductsController could not be found
when i change index() into something else.. it’s produce error…??
Error: The action index is not defined in controller
when i change var name= “Products” into “Produ” it’s says
Error: Database table produ for model Produ was not found.
when i change $this->set(‘Data’, $Data); into $this->set(‘Datas’, $Data);
Error:Undefined variable: Data [APP\views\products\index.ctp, line 2]..hmmm
when i change $Data = $this->Product->find(‘all’); into $Data = $this->Produ->find(‘all’);
whoaa.. produce mass error on screen…