Logging Without Leaking Secrets or PII in PHP and Laravel
Do not log $request->all(), Authorization headers, cookies or passwords. Use Laravel's Log facade with a request id from Log::withContext() or shareContext(), and run context arrays through a redaction helper before writing them. Logs are often copied to Slack, files and log vendors — a secret in a log is a secret out of your app.
