[CakePHP] What is the best way to access another Model in a Controller?
- by kwokwai
Hi all,
Say I got two Controllers like this
Table1sController, and Table2sController.
with corresponding Models:
Table1sModel, Table2sModel
In the Table1sController, I got this:
$this-Table1sModel-action();
Say I want to access some data in Table2sModel
How is it possible to do something like this in Table1sController
I have tried this in Table1sController:
$this-Table2sModel-action();
But I received an error message like this:
Undefined property: Table1sController::$Table2sModel