How to create block in Magento2

start by creating a “Block” (be carefull of the capitalization) folder at the root of your module (/Pfay/Contact/Block). This folder will contain all the blocks of our module (all the logical parts of our module will be in this “Block” folder, and all phtml templates will be in the “view” folder)


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top