Chuyển đến nội dung chính

Magento 2.0 CLI commands

cache
 cache:clean
 cache:disable
 cache:flush
 cache:enable
 indexer:reindex
dev:css:deploy  Compile css to less
sampledata:install adminusername Install sample luma theme
setup:uninstall re-install magento , clean sampledata , clean db


Command should begin with php bin/magento

Nhận xét

Bài đăng phổ biến từ blog này

Dev Tips #Rewrite Prevent duplicate request AJAX when rewrite in Magento

RewriteRule . /index.php [L] # skip POST requests RewriteCond %{REQUEST_METHOD} POST RewriteRule ^ - [L] # browser requests PHP RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^\ ]+)\.php RewriteRule ^/?(.*)\.php$ /$1 [L,R=301] # check to see if the request is for a PHP file: RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^/?(.*)$ /$1.php [L] RewriteRule ^index.php/admin/(.*)$ /admin/$1 [L,R] Rewrite xóa index.php trên url bằng htaccess

Fix XML Validate of PhpStorm in magento 2

PhpStorm 9 with magento 2 dev-1.0.0beta Follow this steps Step1 Step2 Step3 Step4 Step5 Step6 Thanks for visit , share this post if you like

Add external lib to vendor Magento 2

Magento 2 use autoload implement Code style PSR-4 You can add any custom source lib much easier by add require autoload 1. Upload lib files to vendor dir 2. Add file autoload.php in /vendor/lib-folder/autoload.php with content define('FACEBOOK_SDK_V4_SRC_DIR', '/src/Facebook/'); require __DIR__ . '/src/Facebook/autoload.php'; 3. Save and now you can call lib from anywhere like this ---- Injection from constructor and call instance in class \Facebook\Facebook