Clockwork is a PHP development library that records request, command, queue, and test runtime details and exposes them in a browser UI. It captures queries, logs, events, jobs, views, and performance data.
Overview
Clockwork is a PHP development tool that surfaces application runtime information in the browser. The server-side library collects data for HTTP requests and, when enabled, Artisan commands, queue jobs, and tests.
Collected data can include request parameters, timing, log lines, database and cache queries, Redis commands, dispatched events, queued jobs, rendered views, and related stack traces. Collection is active in debug mode by default, with configuration to enable, disable, or store data without exposing it.
Configuration can tune slow-query thresholds, duplicate query detection, on-demand recording, error-only capture, slow-response filters, and stack-trace depth. A web route at /clockwork lists stored requests for inspection outside a single browser session.
Optional Chrome and Firefox devtools extensions complement the in-app route. A client-side toolbar can show basic request information, and the clock() helper logs values during execution.
Key features
- HTTP request profiling data
- Database and cache query logging
- Redis command and event capture
- Queue job and Artisan profiling
- Configurable slow and error filters
- Browser devtools extension support
Use cases
- Debugging Laravel or PHP HTTP requests
- Finding slow or duplicate SQL queries
- Inspecting queue jobs and Artisan commands
- Logging variables during development