Answer the question
In order to leave comments, you need to log in
Codeigniter 4 - Error while updating post. Why?
$data = [
"name" => $request->getPost('name'),
"full_name" => $request->getPost('full_name'),
"login" => $request->getPost('login' ),
"phone" => $request->getPost('phone'),
"avatar" => $request->getPost('avatar'),
"date_update" => date("Ymd H:i:s")
];
$user->update($id, $data);
Whoops error occurs! We seem to have hit a snag. Please try again later... - there are no entries in the logs. Why might it arise?
Answer the question
In order to leave comments, you need to log in
It turns out that in 4 Codeigniter it is necessary to specify $allowedFields in the model
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question