0

I want to insert data in the table directly using object Manager from Model file. I am providing the code snippet but this isn't inserting the data. I want to know the correct syntax to perform the same.`

public function setAttributes()
{
    $attributeModel = $objectManager->get('Insync\ExtendedApi\Model\AttributeFactory')->create();
    $attributeModel->setData(array(('Attribute_Id'= '2', 'Attribute_Name' = 'Checkinsert', 'Attribute_Type' = 'insertion')));
    $attributeModel->save();

}
  • the values are just check values – Naiwrita09 Aug 21 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.