Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Web Tinker Laravel Package

spatie/laravel-web-tinker

Adds Laravel’s Tinker REPL to your browser via a protected route, making it easy to run and tweak code without the terminal. Includes light/dark UI and simple install/publish commands. For local/dev only—can execute arbitrary code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Experience (DX) Enhancement: Accelerates local development by eliminating the need to switch between terminal and browser for quick PHP/Laravel debugging. Reduces context-switching overhead for backend developers.
  • Onboarding & Training: Simplifies Laravel debugging for junior developers or new hires by providing an intuitive, browser-based interface for exploring the framework’s internals.
  • Build vs. Buy Decision: Avoids reinventing a browser-based Tinker tool, leveraging a battle-tested, open-source solution with active maintenance (Laravel 13 support as of 2026).
  • Debugging Workflows: Enables faster iteration during:
    • API endpoint testing (e.g., inspecting Eloquent models, query builders).
    • Migration debugging (e.g., testing raw SQL or seeders).
    • Middleware/Service Container exploration (e.g., binding inspection).
  • Security Tooling: Can be integrated into internal security tools (e.g., penetration testing environments) where controlled, authorized access to Tinker is needed (via custom Gate policies).
  • Educational Use Cases: Useful for internal workshops or documentation examples where live code execution is needed (e.g., "Try this in your /tinker panel").

When to Consider This Package

  • Avoid If:

    • Your team never uses Artisan Tinker (terminal-based workflows are already efficient).
    • You require production support (package explicitly blocks production use; arbitrary code execution is a security risk).
    • Your environment lacks PHP CLI access (e.g., serverless functions or headless deployments where /tinker is inaccessible).
    • You need advanced IDE features (e.g., autocompletion, debugging breakpoints) that terminal Tinker or IDE tools like PHPStorm already provide.
    • Your team prefers dedicated debugging tools (e.g., Laravel Debugbar, Ray, or Xdebug with browser extensions).
  • Consider If:

    • Developers frequently switch between browser and terminal for quick Laravel queries.
    • Your team uses Docker/local environments where terminal access is cumbersome (e.g., VS Code Remote Containers).
    • You need a collaborative debugging tool (e.g., pair programming sessions where sharing terminal access is impractical).
    • Your project relies heavily on PsySH/Tinker for prototyping (e.g., CLI-driven APIs, complex Eloquent relationships).
    • You want to reduce onboarding time for new Laravel developers by providing a familiar, browser-based interface.

How to Pitch It (Stakeholders)

For Executives/Business Stakeholders:

"This package lets our backend team debug and test Laravel code directly in their browsers—no more juggling terminals and browsers. It’s like giving developers a ‘REPL for the web,’ which speeds up development, reduces errors, and lowers the barrier for new hires. Since it’s open-source and maintained by a trusted team (Spatie), it’s a low-risk way to improve developer productivity. Savings: Estimated 15–20% reduction in debugging time for common tasks like querying databases or testing API logic."

For Engineering Leaders:

*"Leveraging spatie/laravel-web-tinker gives our team a browser-based PsySH/Tinker interface, which is especially useful in:

  • Local development: No more php artisan tinker + copy-pasting between terminal and browser.
  • Onboarding: New devs can explore Laravel’s internals (e.g., service container, Eloquent) without terminal anxiety.
  • Docker/remote environments: Debugging is seamless when terminal access is limited.
  • Security: We can restrict access via Laravel’s Gate system (e.g., only allow /tinker for dev users).

Trade-offs:

  • Not for production (explicitly blocked by default).
  • Requires local environment setup (but adds minimal overhead: composer require spatie/laravel-web-tinker --dev).
  • No replacement for Xdebug—this is for quick, interactive exploration.

Proposal: Pilot with the backend team for 2 sprints and measure time saved on debugging tasks. If adoption is high, standardize it across all Laravel projects."*

For Developers:

*"This is Artisan Tinker in your browser—finally! No more:

  • Opening a terminal, typing php artisan tinker, pasting code, copying results, and switching back to the browser.
  • Fighting with Docker terminal sessions or VS Code Remote Containers.

Why it’s awesome: ✅ Dark/light mode (easy on the eyes). ✅ Works with Laravel 13 (and back to Laravel 7). ✅ Customizable output (e.g., timestamp prefixes). ✅ Safe by default (disabled in production; requires Gate setup for non-local use).

How to try it:

  1. Install: composer require spatie/laravel-web-tinker --dev
  2. Publish assets: php artisan web-tinker:install
  3. Visit /tinker in your local app.

Pro tip: Add this to your routes/web.php for quick access:

if (app()->environment('local')) {
    require __DIR__.'/../vendor/spatie/web-tinker/src/routes.php';
}
```"*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai