You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use this plugin with y setup of CakePHP 3.8 but I am unable to run the save data query.
This is my save method in the controller:
`$admin = $this->Admins->newEntity();
if ($this->request->is('post')) {
$admin = $this->Admins->patchEntity($admin, $this->request->getData());
if ($this->Admins->save($admin)) {
$this->Flash->success(__('The admin has been saved.'));
$response = array('success' => true, 'msg' => "success");
} else {
$this->Flash->error(__('The page could not be saved. Please, try again.'));
$response = array('success' => false, 'msg' =>"error");
}
echo json_encode($response);
die;
}`
Commenting this line in the save function mentioned in the "hayko\mongodb\src\ORM\Table.php" $entity->isNew() ? RulesChecker::CREATE : RulesChecker::UPDATE
Did make it work but I am not sure if it's the right way.
The error I get is "Call to a member function select() on array".
Please help me with it ASAP.
The text was updated successfully, but these errors were encountered:
I wanted to use this plugin with y setup of CakePHP 3.8 but I am unable to run the save data query.
This is my save method in the controller:
`$admin = $this->Admins->newEntity();
Commenting this line in the save function mentioned in the "hayko\mongodb\src\ORM\Table.php"
$entity->isNew() ? RulesChecker::CREATE : RulesChecker::UPDATE
Did make it work but I am not sure if it's the right way.
The error I get is "Call to a member function select() on array".
Please help me with it ASAP.
The text was updated successfully, but these errors were encountered: