0
Let’s just say I have the job
public function testeX(){
$x = 1;
$this->set('x', $x);
}
And I want to access the value of x in another Function that has a view testY.ctp
public function testeY(){ // Esta é minha view
//Como faria pra acessar a variavel $x aqui ?
}
I just want to access the value of $x in my test view... because it is the value of $x that has the result of my search that will be shown in a modal. I will go through the value of $x to put in their respective fields.
Are both methods of the same class? I say this because of the
$this
in the first job.– gmsantos
Both are on the same controller.
– Edson Rodrigues