Hello,
this is my function..
// generate keyid
$crud->callbackAfterInsert(
function ($stateParameters) {
$crud->where('pid', $stateParameters->insertId);
$project = $crud->get('projects')->row();
$keyid = substr(str_shuffle(MD5(microtime())), 0, 18);
if (!empty($keyid)) {
$crud->update('projects', ['keyid' => $keyid]);
}
return $stateParameters;
});
Always gives error: <b>Fatal error</b>: Call to a member function where() on null in
But i dont understand... can someone help please?