Small example of how to use ViewModel in for blocks. Done following this tutorial.
Place this in app/code/Niall
and run bin/magento setup:upgrade
Shows up on the default CMS homepage, but can be placed anywhere via the layouts.
Small example of how to use ViewModel instead of overriding Template
Small example of how to use ViewModel in for blocks. Done following this tutorial.
Place this in app/code/Niall
and run bin/magento setup:upgrade
Shows up on the default CMS homepage, but can be placed anywhere via the layouts.
Small example of how to use ViewModel instead of overriding Template