sa manual.cakephp.org:
Citat:
$uses
Does your controller use more than one model? Your FragglesController will automatically load $this->Fraggle, but if you want access to $this->Smurf as well, try adding something like the following to your controller:
var $uses = array('Fraggle','Smurf');
Please notice how you also need to include your Fraggle model in the $uses array, even though it was automatically available before.
U PagesController dodaj u $uses svoj model koji želiš da koristiš - znači Post:
Code:
$uses = array ('Post');
mada Pages sigurno već koristi neke (nemam ovdje CakePHP kod sebe) tako da dodaj u postojeći niz.
Zanima me zašto koristiš Pages controler, jer "po konceptu" trebalo bi da koristiš PostsController za Post model, ili neki tipa News?
"if you fail to plan, you plan to fail"