TransWikia.com

How to save custom table data in Magento 2?

Magento Asked on December 22, 2020

I have created a table using a Controller and Model and in that file show some data.

But i don’t know how to save that data in database i have created a table in Magento 2 db.
But don’t understand how to get those data and save it.

Any help is appriciated.

When i click on send it reload the page and in network it goes to 302 Found.

One Answer

the method you are using is incorrect. Magento 2 provides the UI components for your needs. Here are some examples on how to implement a custom table backend grid and how to save it.

docs: https://devdocs.magento.com/guides/v2.4/ui_comp_guide/howto/new_component_declaration.html

example:

https://webkul.com/blog/create-collection-grid-editadd-grid-row-installer-magento2/

Cheers

Answered by Riccardo Ugolini on December 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP