Follow the below steps to create CRUD Model in Magento 2
Step 1: Setup Script
Step 2: Create Model
Step 3: Create Resource Model
Step 4: Create Resource Model Collection Continue reading CRUD Models Magento 2
Follow the below steps to create CRUD Model in Magento 2
Step 1: Setup Script
Step 2: Create Model
Step 3: Create Resource Model
Step 4: Create Resource Model Collection Continue reading CRUD Models Magento 2
Modules name and its version are normally defined in etc/module.xml file.
These information will also be stored in the table setup_module.
The following command will enable all cache types
php bin/magento cache:enable
If you would like to enable specific cache type, you should type command line
php bin/magento cache:enable CACHE_TYPE
The following command will disable all cache types
php bin/magento cache:disable
If you would like to disable specific cache type, you should type command line
php bin/magento cache:disable CACHE_TYPE
Run the following command to see the cache status
php bin/magento cache:status
Current status:
config: 1
layout: 1
block_html: 1
collections: 1
reflection: 1
db_ddl: 1
eav: 1
customer_notification: 1
config_integration: 1
config_integration_api: 1
full_page: 1
translate: 1
config_webservice: 1
Follow the below steps to create controller in Magento 2
Step 1: Create routes.xml file.
File: app/code/PHPCodez/First/etc/frontend/routes.xml Continue reading Create Controller in Magento 2
Follow the below steps to create a Magento 2 module – PHPcodez_First
Step 1: Create the folder for the module
Step 2: Create etc/module.xml file
Step 3: Create etc/registration.php file
Step 4: Enable the module Continue reading Magento 2 Module Development
The static view files deployment command enables you to write static files to the Magento file system .
The term “Static” means it can be cached for a site( images ,JS and CSS )
The term “View” refers to the presentation layer (from MVC).
Static view files are located in the pub/static directory, and some are cached in the var/view_preprocessed directory as well.
Static view files deployment is affected by Magento modes as follows:
Default and developer modes: Magento generates them on demand, but the rest are cached in a file for speed of access.
Production mode: Static files are not generated or cached.
You can deploy the static content by running the below command.
php bin/magento setup:static-content:deploy
You can enable the module by running the below command.
php bin/magento module:enable Vendorname_Modulename
Or other way, you can access the file app/etc/config.php
You will see a long list of modules there, just add your module as well ‘Vendorname_Modulename’ => 1,
Your module should be available now.