Blueprints · Laravel & PHP
Beginner
5 min · Linux
Laravel debug audit
Prints APP_DEBUG and APP_ENV from the environment file without sending the file anywhere.
Live config
Baked-in protections
- The check is read-only
- APP_KEY is not printed
- Debug should be false in production
Step 1 · bash
Read-only check
/root/portgate-blueprints/laravel-debug-check.sh
Prints three non-secret keys and the file mode.
#!/bin/sh set -eu FILE="/var/www/app/.env" if [ -f "$FILE" ]; then grep -E '^(APP_ENV|APP_DEBUG|APP_URL)=' "$FILE" || echo "Those keys are not set." stat -c '%a %n' "$FILE" else echo "No .env at /var/www/app." fi
Step 2 · text
Production reminder
/root/portgate-blueprints/laravel-production.txt
A note to keep next to the app. It is not applied.
APP_ENV=production APP_DEBUG=false The .env file mode should be 600. Do not commit .env.