Skip to content

Forcing browser caching on custom controller

I have a custom controller with this code: use MagentoFrameworkAppActionHttpGetActionInterface; use MagentoFrameworkAppResponseHttpFactory; use MagentoFrameworkAppResponseInterface; use MagentoFrameworkControllerResultInterface; use MagentoFrameworkExceptionNotFoundException; use MagentoFrameworkViewElementTemplate; use MagentoFrameworkViewResultPageFactory; class Entries implements HttpGetActionInterface { public function __construct( private Navigation $navigation, private readonly PageFactory $resultPageFactory, private readonly HttpFactory… Read More »Forcing browser caching on custom controller

How to filter customer collection by custom field added by db_schema xml file to customer_entity table in Magento 2?

I added ‘custom_field’ to ‘customer_entity’ table by using ‘db_schema.xml’ file and need to save ‘some value’ in it then I wanted to filter the collection by ‘custom_field’ value. How can I achieve this ? When I use the below code.… Read More »How to filter customer collection by custom field added by db_schema xml file to customer_entity table in Magento 2?