Skip to content

Instantly share code, notes, and snippets.

View Affenpilot's full-sized avatar

Florian Büchner Affenpilot

View GitHub Profile
@Affenpilot
Affenpilot / cache-clear
Last active July 3, 2018 09:08
Laravel Cache Clear
// Flush the application cache
php artisan cache:clear
// Remove the configuration cache file
php artisan config:clear
// Remove the route cache file
php artisan route:clear
@Affenpilot
Affenpilot / magento2.sh
Created July 3, 2018 09:06
Magento 2 stuff
#Install
php bin/magento setup:upgrade
#Flush Cache Storage
php bin/magento cache:clean
php bin/magento c:c
#Flush Magento cache
php bin/magento cache:flush
php bin/magento c:f
@Affenpilot
Affenpilot / Remove duplicated entries
Created June 9, 2022 12:08
fix duplicated entry in url_rewrite table
START TRANSACTION;
CREATE TABLE catalog_url_rewrite_product_category_temp SELECT DISTINCT * FROM catalog_url_rewrite_product_category;
ALTER TABLE catalog_url_rewrite_product_category RENAME catalog_url_rewrite_product_category_backup;
ALTER TABLE catalog_url_rewrite_product_category_temp RENAME catalog_url_rewrite_product_category;
DROP TABLE catalog_url_rewrite_product_category_backup;
COMMIT;