Edit Proveedores
This commit is contained in:
@ -30,18 +30,9 @@ class Persona extends Ideal\Repository
|
||||
}
|
||||
public function edit(Define\Model $model, array $new_data): Model\Persona
|
||||
{
|
||||
return $this->update($model, $new_data, ['rut', 'digito', 'nombres', 'apellido_paterno', 'apellido_materno']);
|
||||
return $this->update($model, ['digito', 'nombres', 'apellido_paterno', 'apellido_materno'], $new_data);
|
||||
}
|
||||
|
||||
/*public function fetchById(int $rut): Model\Persona
|
||||
{
|
||||
$query = $this->connection->getQueryBuilder()
|
||||
->select()
|
||||
->from($this->getTable())
|
||||
->where('rut = ?');
|
||||
return $this->fetchOne($query, [$rut]);
|
||||
}*/
|
||||
|
||||
public function filterData(array $data): array
|
||||
{
|
||||
return array_intersect_key($data, array_flip(['rut', 'digito', 'nombres', 'apellido_paterno', 'apellido_materno']));
|
||||
|
@ -80,9 +80,4 @@ class Datos extends Ideal\Repository
|
||||
->where('persona_rut = ?');
|
||||
return $this->fetchOne($query, [$persona_rut]);
|
||||
}
|
||||
|
||||
protected function getKey(): string
|
||||
{
|
||||
return 'persona_rut';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user