I have two classes
class class1 extends Controller
{
public function fun 1($xxxxxx){
$sCliente = new Client;
$sCliente->xxxx = $oData->xxx->id;
$sCliente->name = xxx->fullName;
$sCliente->xxxx = xxxx->email;
$sCliente->id_usuario = $aClient['xxxxx'];
$sCliente->save();
$oIdCliente = $sCliente->id; // esto es para obtener el id
}
}
and this is my other class
class class2 extends Controller
{
public function fun2($xxx){
$oIdClient = $this->ctrCliente()->createUser();
}
}
What I'm trying to do is go through $oIdCliente = $sCliente->id;
pass id
value of create
to the other class but I can not get it to be