Hi,
Previously in CakePHP 2 we are using our custom helper in controller like
below.
App::import('Helper', 'Adminright');
$this->View = new View($this->Controller);
$this->adminright = new AdminrightHelper($this->View);
But when we tried to migrate to CakePHP 3, we cannot able to figured out
How to access another table model and its function in model in CakePHP 3?
I have tried different ways, like loadModel, TableRegistry::get,
ClassRegistery:get. But not single one is working.
Any idea would definitely help a lot.
Thanks,
Jitendra
--
Like Us on FaceBook https://www.facebook.com/
In cakephp 2.2.x, we can have automatic join work for cross databases with
a simple patch:
"lib/Model/Datasource/DboSource.php function read()
if ($model->useDbConfig === $linkModel->useDbConfig) {
...
to
if ($model->useDbConfig === $linkModel->useDbConfig || $type=='belongsTo') {
...
But in