This commit is contained in:
Alfin Afif 2025-07-30 01:16:04 +07:00
parent 93c02d1d4d
commit 0d7e25df6e

View File

@ -14,6 +14,9 @@ if [ ! -f .env ]; then
cp slack.env .env
fi
php artisan cache:table
php artisan migrate
# Generate app key jika belum ada
if ! grep -q "APP_KEY=" .env || [ -z "$(php artisan key:generate --show 2>/dev/null)" ]; then
echo "Generating app key..."
@ -22,20 +25,20 @@ fi
# echo "Generating app key..."
# php artisan key:generate
# Cek apakah database sudah terhubung
if ! php artisan migrate:status > /dev/null 2>&1; then
echo "Database connection failed. Please check your .env file."
exit 1
fi
# # Cek apakah database sudah terhubung
# if ! php artisan migrate:status > /dev/null 2>&1; then
# echo "Database connection failed. Please check your .env file."
# exit 1
# fi
# Cek apakah optimize sudah bersih
if ! php artisan optimize:clear > /dev/null 2>&1; then
echo "Clearing optimize..."
php artisan optimize:clear || {
echo "Optimize clear failed. Please check your Laravel setup."
exit 1
}
fi
# # Cek apakah optimize sudah bersih
# if ! php artisan optimize:clear > /dev/null 2>&1; then
# echo "Clearing optimize..."
# php artisan optimize:clear || {
# echo "Optimize clear failed. Please check your Laravel setup."
# exit 1
# }
# fi
# Cek apakah config sudah bersih
# if ! php artisan config:clear > /dev/null 2>&1; then