PHP has recently launched its new version i.e. PHP 8 and it consists of many new features, constructor property promotion is one of the new features introduced in PHP 8. In previous versions of PHP(~7.*), we used to define our variables as class property and assign its value in the constructor...
Decomposition of Magento Controllers
Controllers are the most important thing in MVC pattern, controller helps to receive request, process and render pages. To create a frontend controller and to process the request we need to extend our controller class with Magento\Framework\App\Action\Action class this class context gives some added features to handle request type and to validate authorized users...
Custom Router in Magento 2
In our development lifecycle, we face the situation where we need to create a custom URL for our module or we need to modify the route to match the requirement, in this situation we need to create a custom router in Magento 2...
Grunt For Magento 2
Grunt is basically a task runner tool that helps to automate any compilation process. Grunt supports tasks like saas, jade, less, and many more. ...
CSP In Magento 2
CSP is a standard introduced to prevent attacks on your website. Attacks mean an XSS, clickjacking, or malicious code injection. CSP is widely supported by all the modern web browsers and it gives privilege to website owners to approve origins of content that browsers should be allowed to load on that website....