How to use custom helper in Controller. CakePHP 3 only.

2015-08-31 Thread Jitendra Rathod
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

Use another table model in model - CakePHP 3

2015-08-11 Thread Jitendra Rathod
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/

automatic join for belongsTo association with cross databases not work

2014-11-03 Thread Jitendra Rathod
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