I'm wreaking my brain, unable to figure this one out.
I have the folowing code:
PHP Code:
if ($klantenModel->insert([
'id' => $this->request->getPost('id'),
'naam' => $this->request->getPost('naam'),
'woonplaats' => $this->request->getPost('woonplaats')
]))
{
return redirect()->to($_ENV['app.baseURL'] . 'klanten')->with('success', 'Gelukt.');
}
return redirect()->to($_ENV['app.baseURL'] . 'klanten')->with('error', 'Fout.');
What happens is dat the insert does what I expect (it inserts the data without a glitch), yet it returns false. And I can't figure out why. It doesn't insert empty columns, the data types of the respective columns in the database are correct (int for id and varchar(100) for the others).
I hope you guys can help me figure out what the cause of this behavior is.