P
P
Pavel Chirkov2018-10-17 13:42:23
CodeIgniter
Pavel Chirkov, 2018-10-17 13:42:23

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

1 answer(s)
P
Pavel Chirkov, 2018-10-18
@pawelch7

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 question

Ask a Question

731 491 924 answers to any question