Not sure I understand what you are trying to do, but in a class you could do
class myClass{
private $var;
public function funcA(){
$this->var = "Test";
return $this->var;
}
public function funcB(){
//$var ;
echo "Yeah I reused " . $this->var;
}
}
omaromp2 liked this reply
Well I ended up reusing the var via compact. Not sure it was what I was looking for but it worked.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community