PHPackages                             itsgoingd/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. itsgoingd/clockwork

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

itsgoingd/clockwork
===================

php dev tools in your browser

v5.3.5(8mo ago)5.9k27.6M—3.4%333[31 issues](https://github.com/itsgoingd/clockwork/issues)[9 PRs](https://github.com/itsgoingd/clockwork/pulls)20MITPHPPHP &gt;=7.1

Since Jun 24Pushed 8mo ago64 watchersCompare

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

READMEChangelog (10)DependenciesVersions (126)Used By (20)

 [![](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)

Visit `/clockwork` route 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

69

—

FairBetter than 100% of packages

Maintenance61

Regular maintenance activity

Popularity79

Solid adoption and visibility

Community51

Growing community involvement

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 89% 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 ~36 days

Recently: every ~71 days

Total

125

Last Release

246d ago

Major Versions

v0.9.1 → v1.12013-09-27

v1.x-dev → v2.02017-09-29

v2.x-dev → v3.02018-07-30

v3.x-dev → v4.0.02019-07-09

v4.x-dev → v5.0.0-beta02020-10-03

PHP version history (6 changes)v0.9.0PHP &gt;=5.3.0

v1.3PHP &gt;=5.3.9

v2.0PHP &gt;=5.4

v3.0PHP &gt;=5.5

v5.0.0-beta0PHP &gt;=5.6

v5.3.0-beta1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ce166538f2b7d762980612939173f8e8324a402c5cdcc5cd86dc93c85d57f91?d=identicon)[itsgoingd](/maintainers/itsgoingd)

---

Top Contributors

[![itsgoingd](https://avatars.githubusercontent.com/u/821582?v=4)](https://github.com/itsgoingd "itsgoingd (932 commits)")[![christopherh0rn](https://avatars.githubusercontent.com/u/13766234?v=4)](https://github.com/christopherh0rn "christopherh0rn (16 commits)")[![UlrichEckhardt](https://avatars.githubusercontent.com/u/8566055?v=4)](https://github.com/UlrichEckhardt "UlrichEckhardt (14 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)")[![villermen](https://avatars.githubusercontent.com/u/1106303?v=4)](https://github.com/villermen "villermen (5 commits)")[![alies-dev](https://avatars.githubusercontent.com/u/5278175?v=4)](https://github.com/alies-dev "alies-dev (4 commits)")[![ryzr](https://avatars.githubusercontent.com/u/9389421?v=4)](https://github.com/ryzr "ryzr (4 commits)")[![JulianMar](https://avatars.githubusercontent.com/u/29117090?v=4)](https://github.com/JulianMar "JulianMar (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)")[![maximepvrt](https://avatars.githubusercontent.com/u/1840026?v=4)](https://github.com/maximepvrt "maximepvrt (3 commits)")[![YannikFirre](https://avatars.githubusercontent.com/u/3316758?v=4)](https://github.com/YannikFirre "YannikFirre (3 commits)")[![meanevo](https://avatars.githubusercontent.com/u/1898273?v=4)](https://github.com/meanevo "meanevo (2 commits)")[![mortenscheel](https://avatars.githubusercontent.com/u/6514342?v=4)](https://github.com/mortenscheel "mortenscheel (2 commits)")[![osbre](https://avatars.githubusercontent.com/u/23292709?v=4)](https://github.com/osbre "osbre (2 commits)")

---

Tags

clockworkdebuggingdevtoolslaravelloggingphpprofilinglaravelloggingdebuggingprofilingslimDevtoolslumen

### Embed Badge

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

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

###  Alternatives

[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)
