46 lines
932 B
Bash
46 lines
932 B
Bash
#!/bin/bash
|
|
|
|
# 清除 Laravel 快取和重新快取設定
|
|
echo "Clearing Laravel caches..."
|
|
|
|
php artisan config:clear
|
|
if [ $? -eq 0 ]; then
|
|
echo "Config cache cleared successfully."
|
|
else
|
|
echo "Failed to clear config cache."
|
|
exit 1
|
|
fi
|
|
|
|
php artisan cache:clear
|
|
if [ $? -eq 0 ]; then
|
|
echo "Application cache cleared successfully."
|
|
else
|
|
echo "Failed to clear application cache."
|
|
exit 1
|
|
fi
|
|
|
|
php artisan route:clear
|
|
if [ $? -eq 0 ]; then
|
|
echo "Route cache cleared successfully."
|
|
else
|
|
echo "Failed to clear route cache."
|
|
exit 1
|
|
fi
|
|
|
|
php artisan view:clear
|
|
if [ $? -eq 0 ]; then
|
|
echo "View cache cleared successfully."
|
|
else
|
|
echo "Failed to clear view cache."
|
|
exit 1
|
|
fi
|
|
|
|
php artisan config:cache
|
|
if [ $? -eq 0 ]; then
|
|
echo "Config cache regenerated successfully."
|
|
else
|
|
echo "Failed to regenerate config cache."
|
|
exit 1
|
|
fi
|
|
|
|
echo "All Laravel cache operations completed successfully."
|