Hi, My name is Jose Angel y have problem, not understand function of of callbackafterinsert and callbackafterupdate, i see examples in the grocery enterprise, i copy and paste and modify parameters, not function, in version free grocery crud is easy.
The real problem is that in table update all fields of rows, only update only row.
code
$crud->callbackAfterInsert(function ($stateParameters) {
$this->db->where('iddelitosporcaso', $stateParameters->insertId);
$delitosporcaso = $this->db->get('delitosporcaso')->row();
if (!empty($delitosporcaso)) {
$this->db->update('delitosporcaso',
['idusuarios' => $this->uri->segment(4)],
['iddelitosporcaso' => $stateParameters->insertId]]);
}
return $stateParameters;
});