PHPackages                             leeroy/clockwork - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. leeroy/clockwork

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

leeroy/clockwork
================

php dev tools in your browser

v5.1.1(3y ago)0254MITPHPPHP &gt;=5.6

Since Nov 2Pushed 3y agoCompare

[ Source](https://github.com/LeeroyLabs/clockwork)[ Packagist](https://packagist.org/packages/leeroy/clockwork)[ Docs](https://underground.works/clockwork)[ GitHub Sponsors](https://github.com/itsgoingd)[ RSS](/packages/leeroy-clockwork/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

 [![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/title.png)](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/title.png) [![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/screenshot.png)](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/screenshot.png)

> Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including request data, performance metrics, log entries, database queries, cache queries, redis commands, dispatched events, queued jobs, rendered views and more - for HTTP requests, commands, queue jobs and tests.

> *This repository contains the server-side component of Clockwork.*

> Check out on the [Clockwork website](https://underground.works/clockwork) for details.

 [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-1.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-2.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-3.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-4.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-5.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-6.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-7.png) ](https://underground.works/clockwork) [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/features-8.png) ](https://underground.works/clockwork)

### Installation

[](#installation)

Install the Clockwork library via [Composer](https://getcomposer.org/).

```
$ composer require itsgoingd/clockwork

```

Congratulations, you are done! To enable more features like commands or queue jobs profiling, publish the configuration file via the `vendor:publish` Artisan command.

**Note:** If you are using the Laravel route cache, you will need to refresh it using the route:cache Artisan command.

Read [full installation instructions](https://underground.works/clockwork/#docs-installation) on the Clockwork website.

### Features

[](#features)

#### Collecting data

[](#collecting-data)

The Clockwork server-side component collects and stores data about your application.

Clockwork is only active when your app is in debug mode by default. You can choose to explicitly enable or disable Clockwork, or even set Clockwork to always collect data without exposing them for further analysis.

We collect a whole bunch of useful data by default, but you can enable more features or disable features you don't need in the config file.

Some features might allow for advanced options, eg. for database queries you can set a slow query threshold or enable detecting of duplicate (N+1) queries. Check out the config file to see all what Clockwork can do.

There are several options that allow you to choose for which requests Clockwork is active.

On-demand mode will collect data only when Clockwork app is open. You can even specify a secret to be set in the app settings to collect request. Errors only will record only requests ending with 4xx and 5xx responses. Slow only will collect only requests with responses above the set slow threshold. You can also filter the collected and recorded requests by a custom closure. CORS pre-flight requests will not be collected by default.

New in Clockwork 4.1, artisan commands, queue jobs and tests can now also be collected, you need to enable this in the config file.

Clockwork also collects stack traces for data like log messages or database queries. Last 10 frames of the trace are collected by default. You can change the frames limit or disable this feature in the configuration file.

#### Viewing data

[](#viewing-data)

##### Web interface

[](#web-interface)

Open `your.app/clockwork` to view and interact with the collected data.

The app will show all executed requests, which is useful when the request is not made by browser, but for example a mobile application you are developing an API for.

##### Browser extension

[](#browser-extension)

A browser dev tools extension is also available for Chrome and Firefox:

- [Chrome Web Store](https://chrome.google.com/webstore/detail/clockwork/dmggabnehkmmfmdffgajcflpdjlnoemp)
- [Firefox Addons](https://addons.mozilla.org/en-US/firefox/addon/clockwork-dev-tools/)

##### Toolbar

[](#toolbar)

Clockwork now gives you an option to show basic request information in the form of a toolbar in your app.

The toolbar is fully rendered client-side and requires installing a tiny javascript library.

[Learn more](https://underground.works/clockwork/#docs-viewing-data) on the Clockwork website.

#### Logging

[](#logging)

You can log any variable via the clock() helper, from a simple string to an array or object, even multiple values:

```
clock(User::first(), auth()->user(), $username)
```

The `clock()` helper function returns it's first argument, so you can easily add inline debugging statements to your code:

```
User::create(clock($request->all()))
```

If you want to specify a log level, you can use the long-form call:

```
clock()->info("User {$username} logged in!")
```

#### Timeline

[](#timeline)

Timeline gives you a visual representation of your application runtime.

To add an event to the timeline - start it with a description, execute the tracked code and finish the event. A fluent api is available to further configure the event.

```
// using timeline api with begin/end and fluent configuration
clock()->event('Importing tweets')->color('purple')->begin();
    ...
clock()->event('Importing tweets')->end();
```

Alternatively you can execute the tracked code block as a closure. You can also choose to use an array based configuration instead of the fluent api.

```
// using timeline api with run and array-based configuration
clock()->event('Updating cache', [ 'color' => 'green' ])->run(function () {
    ...
});
```

Read more about available features on the [Clockwork website](https://underground.works/clockwork).

 [ ![](https://github.com/itsgoingd/clockwork/raw/master/.github/assets/footer.png) ](https://underground.works)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

1288d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92767cd5e1ad8cc0aab1bd087488a7356b1d40a37eb17063d023cf3192e5fa78?d=identicon)[Leeroy Digital Agency](/maintainers/Leeroy%20Digital%20Agency)

---

Top Contributors

[![itsgoingd](https://avatars.githubusercontent.com/u/821582?v=4)](https://github.com/itsgoingd "itsgoingd (784 commits)")[![ssnepenthe](https://avatars.githubusercontent.com/u/10903810?v=4)](https://github.com/ssnepenthe "ssnepenthe (9 commits)")[![pwhelan](https://avatars.githubusercontent.com/u/601645?v=4)](https://github.com/pwhelan "pwhelan (7 commits)")[![BradEstey](https://avatars.githubusercontent.com/u/578665?v=4)](https://github.com/BradEstey "BradEstey (5 commits)")[![alies-dev](https://avatars.githubusercontent.com/u/5278175?v=4)](https://github.com/alies-dev "alies-dev (4 commits)")[![akalongman](https://avatars.githubusercontent.com/u/423050?v=4)](https://github.com/akalongman "akalongman (3 commits)")[![edgardmessias](https://avatars.githubusercontent.com/u/1530997?v=4)](https://github.com/edgardmessias "edgardmessias (3 commits)")[![Garbee](https://avatars.githubusercontent.com/u/868301?v=4)](https://github.com/Garbee "Garbee (3 commits)")[![jerguslejko](https://avatars.githubusercontent.com/u/4470539?v=4)](https://github.com/jerguslejko "jerguslejko (3 commits)")[![matiux](https://avatars.githubusercontent.com/u/821668?v=4)](https://github.com/matiux "matiux (3 commits)")[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (3 commits)")[![YannikFirre](https://avatars.githubusercontent.com/u/3316758?v=4)](https://github.com/YannikFirre "YannikFirre (3 commits)")[![hermanzhu](https://avatars.githubusercontent.com/u/1592161?v=4)](https://github.com/hermanzhu "hermanzhu (2 commits)")[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (2 commits)")[![auchanhub](https://avatars.githubusercontent.com/u/34035978?v=4)](https://github.com/auchanhub "auchanhub (2 commits)")[![lenssoft](https://avatars.githubusercontent.com/u/9431885?v=4)](https://github.com/lenssoft "lenssoft (2 commits)")[![lubatti](https://avatars.githubusercontent.com/u/12738908?v=4)](https://github.com/lubatti "lubatti (2 commits)")[![UlrichEckhardt](https://avatars.githubusercontent.com/u/8566055?v=4)](https://github.com/UlrichEckhardt "UlrichEckhardt (2 commits)")[![maximebeaudoin](https://avatars.githubusercontent.com/u/3246184?v=4)](https://github.com/maximebeaudoin "maximebeaudoin (2 commits)")[![meanevo](https://avatars.githubusercontent.com/u/1898273?v=4)](https://github.com/meanevo "meanevo (2 commits)")

---

Tags

laravelloggingdebuggingprofilingslimDevtoolslumen

### Embed Badge

![Health badge](/badges/leeroy-clockwork/health.svg)

```
[![Health](https://phpackages.com/badges/leeroy-clockwork/health.svg)](https://phpackages.com/packages/leeroy-clockwork)
```

###  Alternatives

[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[ptrofimov/clockwork-cli

Command-line interface for Clockwork, the tool for debugging and profiling PHP applications

43116.1k](/packages/ptrofimov-clockwork-cli)[ytake/laravel-fluent-logger

fluent logger for laravel and lumen

63541.6k1](/packages/ytake-laravel-fluent-logger)[moesif/moesif-laravel

Moesif Collection/Data Ingestion Middleware for Laravel

1065.8k](/packages/moesif-moesif-laravel)[melihovv/laravel-log-viewer

A Laravel log viewer

1231.5k1](/packages/melihovv-laravel-log-viewer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
