API
This commit is contained in:
@ -70,11 +70,19 @@ class Operador extends Agente {
|
||||
$output = [
|
||||
'input' => $data,
|
||||
'operador' => $operador->as_array(),
|
||||
'new' => $found,
|
||||
'new' => !$found,
|
||||
'created' => $created
|
||||
];
|
||||
return $output;
|
||||
}
|
||||
public function addProyecto($data) {
|
||||
$data['agente'] = $this->findAgenteTipo('operador')->id;
|
||||
$pa = ProyectoAgente::add($data);
|
||||
return [
|
||||
'operador' => $this->as_array(),
|
||||
'proyecto_agente' => $pa
|
||||
];
|
||||
}
|
||||
|
||||
public function as_array() {
|
||||
$arr = parent::as_array();
|
||||
|
Reference in New Issue
Block a user