PHPackages                             ttbooking/laravel-web-tinker - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. ttbooking/laravel-web-tinker

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

ttbooking/laravel-web-tinker
============================

Artisan Tinker in your browser

1.7.7(5y ago)05MITJavaScriptPHP ^7.2

Since Feb 8Pushed 5y agoCompare

[ Source](https://github.com/ttbooking/laravel-web-tinker)[ Packagist](https://packagist.org/packages/ttbooking/laravel-web-tinker)[ Docs](https://github.com/spatie/laravel-web-tinker)[ Fund](https://spatie.be/open-source/support-us)[ RSS](/packages/ttbooking-laravel-web-tinker/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (31)Used By (0)

Artisan Tinker in your browser
==============================

[](#artisan-tinker-in-your-browser)

[![Latest Version on Packagist](https://camo.githubusercontent.com/76bf8834922bfc0fb90d0c38cb2d02bbc45fa8e9ccefaa831f77f8b1e0184be2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d7765622d74696e6b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-web-tinker)[![GitHub Workflow Status](https://camo.githubusercontent.com/2a8b964180e9b684b1851177fc7f09d820fe73ef8e39f61e523210875d743763/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7370617469652f6c61726176656c2d7765622d74696e6b65722f72756e2d74657374733f6c6162656c3d7465737473)](https://camo.githubusercontent.com/2a8b964180e9b684b1851177fc7f09d820fe73ef8e39f61e523210875d743763/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7370617469652f6c61726176656c2d7765622d74696e6b65722f72756e2d74657374733f6c6162656c3d7465737473)[![Total Downloads](https://camo.githubusercontent.com/68dd0fe85f7db0921cc00da82d1e5ef1a2e90eb3824193d57c0cce969ed64b94/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d7765622d74696e6b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-web-tinker)

Artisan's tinker command is a great way to tinker with your application in the terminal. Unfortunately running a few lines of code, making edits, and copy/pasting code can be bothersome. Wouldn't it be great to tinker in the browser?

This package will add a route to your application where you can tinker to your heart's content.

[![Web tinker light](https://camo.githubusercontent.com/0603f41a58c0c74d860aa2d4b47a06aea54c8ca1fbd8df30f6242221e09a7b94/68747470733a2f2f7370617469652e6769746875622e696f2f6c61726176656c2d7765622d74696e6b65722f6c696768742e706e67)](https://camo.githubusercontent.com/0603f41a58c0c74d860aa2d4b47a06aea54c8ca1fbd8df30f6242221e09a7b94/68747470733a2f2f7370617469652e6769746875622e696f2f6c61726176656c2d7765622d74696e6b65722f6c696768742e706e67)

In case light hurts your eyes, there's a dark mode too.

[![Web tinker dark](https://camo.githubusercontent.com/e0016af41658038bb7c85ffec02e62988e2cb721eadb3521dfa4784daf0d1343/68747470733a2f2f7370617469652e6769746875622e696f2f6c61726176656c2d7765622d74696e6b65722f6461726b2e706e67)](https://camo.githubusercontent.com/e0016af41658038bb7c85ffec02e62988e2cb721eadb3521dfa4784daf0d1343/68747470733a2f2f7370617469652e6769746875622e696f2f6c61726176656c2d7765622d74696e6b65722f6461726b2e706e67)

Support us
----------

[](#support-us)

Learn how to create a package like this one, by watching our premium video course:

[![Laravel Package training](https://camo.githubusercontent.com/4c7f3720a29525e627f6004ee367e55def510e45d18e6bc974725812fa5cf257/68747470733a2f2f7370617469652e62652f6769746875622f7061636b6167652d747261696e696e672e6a7067)](https://laravelpackage.training)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

🚨 A word to the wise 🚨
----------------------

[](#-a-word-to-the-wise-)

This package can run arbitrary code. Unless you know what you are doing, you should never install or use this in a production environment, or any environment where you handle real world data.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require spatie/laravel-web-tinker --dev
```

Next, you must publish the assets from this package by running this command.

```
php artisan web-tinker:install
```

Optionally, you can publish the config file of the package.

```
php artisan vendor:publish --provider="Spatie\WebTinker\WebTinkerServiceProvider" --tag="config"
```

This is the content that will be published to `config/web-tinker.php`

```
return [

    /*
     * Possible values are 'auto', 'light' and 'dark'.
     */
    'theme' => 'auto',

    /*
     * By default this package will only run in local development.
     * Do not change this, unless you know what your are doing.
     */
    'enabled' => env('APP_ENV') === 'local',

   /*
    * This class can modify the output returned by Tinker. You can replace this with
    * any class that implements \Spatie\WebTinker\OutputModifiers\OutputModifier.
    */
    'output_modifier' => \Spatie\WebTinker\OutputModifiers\PrefixDateTime::class,

    /*
     * If you want to fine-tune PsySH configuration specify
     * configuration file name, relative to the root of your
     * application directory.
     */
    'config_file' => env('PSYSH_CONFIG', null),

];
```

Usage
-----

[](#usage)

By default this package will only run in a local environment.

Visit `/tinker` in your local environment of your app to view the tinker page.

Authorization
-------------

[](#authorization)

Should you want to run this in another environment (we do not recommend this), there are two steps you must perform.

1. You must register a `viewWebTinker` ability. A good place to do this is in the `AuthServiceProvider` that ships with Laravel.

```
public function boot()
{
    $this->registerPolicies();

    Gate::define('viewWebTinker', function ($user = null) {
        // return true if access to web tinker is allowed
    });
}
```

2. You must set the `enabled` variable in the `web-tinker` config file to `true`.

Modifying the output
--------------------

[](#modifying-the-output)

You can modify the output of tinker by specifying an output modifier in the `output_modifier` key of the `web-tinker` config file. An output modifier is any class that implements `\Spatie\WebTinker\OutputModifiers\OutputModifier`.

This is how that interface looks like.

```
namespace Spatie\WebTinker\OutputModifiers;

interface OutputModifier
{
    public function modify(string $output = ''): string;
}
```

The default install of this package will use the `PrefixDataTime` output modifier which prefixes the output from Tinker with the current date time.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

This package was inspired by and uses code from the [nova-tinker-tool](https://github.com/beyondcode/nova-tinker-tool) package by [Marcel Pociot](https://github.com/mpociot).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 57.8% 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 ~21 days

Recently: every ~36 days

Total

29

Last Release

2052d ago

Major Versions

0.0.1 → 1.0.02019-02-08

PHP version history (2 changes)0.0.1PHP ^7.1

1.3.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/40a68a3f1473968f24ec70a09cd3a534f657a48e7d65ce187f8af3481c416ce0?d=identicon)[daniser](/maintainers/daniser)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (111 commits)")[![rzv-me](https://avatars.githubusercontent.com/u/38325118?v=4)](https://github.com/rzv-me "rzv-me (17 commits)")[![willemvb](https://avatars.githubusercontent.com/u/1336390?v=4)](https://github.com/willemvb "willemvb (12 commits)")[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (8 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![setkyar](https://avatars.githubusercontent.com/u/4435358?v=4)](https://github.com/setkyar "setkyar (5 commits)")[![brendt](https://avatars.githubusercontent.com/u/6905297?v=4)](https://github.com/brendt "brendt (4 commits)")[![ahmic](https://avatars.githubusercontent.com/u/13452362?v=4)](https://github.com/ahmic "ahmic (3 commits)")[![d13r](https://avatars.githubusercontent.com/u/236616?v=4)](https://github.com/d13r "d13r (3 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (2 commits)")[![chapeupreto](https://avatars.githubusercontent.com/u/834048?v=4)](https://github.com/chapeupreto "chapeupreto (2 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (2 commits)")[![malikkrehic](https://avatars.githubusercontent.com/u/22316407?v=4)](https://github.com/malikkrehic "malikkrehic (1 commits)")[![CraftLogan](https://avatars.githubusercontent.com/u/10950466?v=4)](https://github.com/CraftLogan "CraftLogan (1 commits)")[![emargareten](https://avatars.githubusercontent.com/u/46111162?v=4)](https://github.com/emargareten "emargareten (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (1 commits)")[![parse-dinghua](https://avatars.githubusercontent.com/u/54979620?v=4)](https://github.com/parse-dinghua "parse-dinghua (1 commits)")[![plunkettscott](https://avatars.githubusercontent.com/u/4952170?v=4)](https://github.com/plunkettscott "plunkettscott (1 commits)")

---

Tags

spatielaraveldebugTinkerdevelopmentweb-tinker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ttbooking-laravel-web-tinker/health.svg)

```
[![Health](https://phpackages.com/badges/ttbooking-laravel-web-tinker/health.svg)](https://phpackages.com/packages/ttbooking-laravel-web-tinker)
```

###  Alternatives

[spatie/laravel-web-tinker

Artisan Tinker in your browser

1.2k3.8M6](/packages/spatie-laravel-web-tinker)[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k124.3M624](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[php-console/laravel-service-provider

Laravel service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

7361.2k1](/packages/php-console-laravel-service-provider)

PHPackages © 2026

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