spatie/laravel-http-logger
This Laravel middleware logs incoming HTTP requests to your default log, so you can still access the original request data if something goes wrong. An extra safety net for critical user submissions like lead-generating forms, with configurable log profile, writer, and channel.
except list (defaults to password and password_confirmation), a sanitize_headers list (e.g. Authorization, Cookie, Set-Cookie), a dedicated log_channel, a log_level, and an enabled flag bound to HTTP_LOGGER_ENABLED. That means we can ship this with a defensible redaction story rather than "we log everything and hope."LogProfile that decides which requests get logged, and (3) per-route middleware attachment so we can enable it only on high-value endpoints (checkout, lead forms, webhooks) instead of the whole app. This lets us choose "log everything in staging, log only the 4 revenue-critical endpoints in prod."LogProfile::shouldLogRequest, LogWriter::logRequest), it functions well as a stopgap on the roadmap — ship in a sprint, buy time, and defer investment in a proper structured audit/event pipeline until there's evidence of need. Replacing it later is a config change plus a custom writer class, not a migration.QUERY HTTP method to LogNonGetRequests alongside POST/PUT/PATCH/DELETE, and the release history tracks every Laravel major (L9 through L13). For a PM, that's evidence the package follows the framework's direction, so picking it doesn't create a "stuck on an old Laravel" decision later.composer require plus one middleware registration.spatie/laravel-activitylog or an in-house audit_events table), not file logs.except list. Log files rotate and disappear; that is not an audit record a regulator or auditor will accept.except list and sanitize_headers configuration, and you should get security sign-off before enabling it on endpoints carrying sensitive fields.For executives (one paragraph): We lose revenue when a customer's submission fails and we can't reconstruct what they sent. This is a free, MIT-licensed, Spatie-maintained Laravel package that records the details of incoming form and API submissions to our existing logs — it's the difference between "the customer says they submitted the form" and "here is exactly what they submitted." Integration is roughly one dependency and one line of middleware registration, it can be switched off entirely per environment with a single setting, and it can be limited to just the handful of endpoints that generate revenue. It is not a compliance audit system and it is not a replacement for our monitoring; it's a cheap safety net that pays for itself the first time we recover a lost lead without asking the customer to resubmit.
For engineering (the short version): Add spatie/laravel-http-logger, register Spatie\HttpLogger\Middlewares\HttpLogger — globally if you want broad coverage, or per-route on the endpoints that matter. By default it logs POST/PUT/PATCH/DELETE/QUERY to the default log channel; override log_profile to narrow that, log_writer to change the output format or destination, log_channel and log_level for routing, and except/sanitize_headers for redaction. Gate it with HTTP_LOGGER_ENABLED so it's off in local and on in production. It's stable, tracks every Laravel major through 13, and the entire extension surface is two interfaces — if we ever outgrow it, a custom LogWriter that writes to a table is a contained change, not a rewrite.
The honest caveat to state up front: this produces log lines, not a database. It is a debugging and lead-recovery tool with a small footprint and a small community (673 stars, no listed dependents), which is proportionate to its size but means we should treat it as a utility we can comfortably fork, not a platform. If the business requirement turns out to be auditability, retention, or reporting, that's a separate and larger initiative.
How can I help you explore Laravel packages today?