I am using CakePHP3.6 for my project. I have created following function in Options controller:
public function getValue($id = null){
$options=$this->Options->find()->where(['id'=>$id])->first();
return $options->value;
}
then I am calling this function into function of another controller(any xyz controller) as follow:
$r = $this->Options->getValue(1);
Now I am getting error 'Unknown method "getValue"'.
Same Procedure I followed for CakePHP3.2, it worked well. So Please help me, How to call function of another controller into function of other controller for CakePHP3.6?