0

I want to declare table in config.xml I am put but that is not working

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <global>
        <models>
            <pwa_pay>
                <class>Pwa\Pay\Model</class>
                <resourceModel>Pwa\Pay\Model\ResourceModel</resourceModel>
            </pwa_pay>
            <pwa_pay_resource>
                <class>Pwa\Pay\Model\ResourceModel</class>
                <entities>
                    <demotable>
                        <table>demo_table</table>
                    </demotable>
                </entities>
            </pwa_pay_resource>
        </models>

    </global> 

how can call in setup and modle in magento 2

And how can call in setup and model please see: Magento 2 getTable behavior

1 Answer 1

1

in magento2 we are not using any table in config.xml , in m2 config.xml is used for set default value , and also no where we are mention resources tag in xml just directly call the model and collection factory based on init it will generate the collection

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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