i already have a table in database also created model files and all works fine so now added another table successfully so what changes i need to do with model files

i mean in model resourcemodel and connection files..

  • Have you got solution? or you have any concern. – Chirag Patel Oct 1 '18 at 11:04
  • yes got it ...now works – Tirth Patel Oct 1 '18 at 11:44
  • If you happy with the solution then you can accept as a answer. :) – Chirag Patel Oct 1 '18 at 11:51

@Tirth Patel I think you should create separate model as well as Resource file for another db table.


You need to add another resource modal connection (CRUD)

Step : 1 Create Model


Step : 2 Create Resource Model


Step : 3 Create Resource Model Collection - Get Model Collection


After this please run this command line:

php bin/magento setup:upgrade

php bin/magento C:F


do same process for your second table what you have done for your first table. i mean create diffrent model,resource file for your second table.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.