I have the following Model and Controller files, and when I find this url http://....../pois/index, I get this error:
Notice (8): Undefined property: PoisController::$Poi [APP/controllers/pois_controller.php, line 5]
Fatal error: Call to a member function find() on a non-object in /home/joecoyle/public_html/app/controllers/pois_controller.php on line 5
This model is called poi.php:
<?php
class Poi extends AppModel {
}
?>
And the controller is called pois_controller.php
<?php
class PoisController extends AppController {
function index(){
$this->set('pois',$this->Poi->find('all'));
}
}
?>
Since I'm new to CakePHP, I'm not sure what causes this error, since everything seems to be called right, and I follow the guide on the CakePHP site ...
thank
source
share