Weave 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 a browser route to your Laravel app for running Artisan tinker without the terminal. Includes light and dark modes, but executes arbitrary code, so use it only as a dev dependency and never in production or with real data.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer-experience (DX) investment, not product capability. This is an engineering-enablement tool: a browser route that exposes Artisan Tinker (PsySH) so developers can execute PHP against the app without a terminal. Treat it as a line item in "how we build," not "what we ship." It should never appear on a customer-facing roadmap.
  • Onboarding and ramp-up time. New Laravel hires spend real hours context-switching between editor, terminal, and REPL. A browser REPL with output history lowers the activation energy for exploring models, relationships, and query results. If onboarding time-to-first-PR is a tracked metric, this is a cheap lever.
  • Debugging cycle time for support and ops triage. When a bug report needs "what does this record actually look like," the fastest path today is SSH → php artisan tinker → paste. A local/staging URL shortens that loop and works in containerized or remote-dev setups where terminal access is awkward (Docker, dev containers, Windows).
  • Build vs. buy: adopt, don't build. The underlying mechanics (route + PsySH + a Vue panel) are trivial to replicate, but the maintenance tail is not: Laravel 9→13 compatibility, Docker request-hang fixes, HTML-injection patches, PsySH config passthrough. A composer require --dev is a fraction of the cost of owning that. MIT license, Spatie-maintained, 1.2k stars — free with a credible maintainer.
  • Environment standards decision. Adopting it forces a useful explicit policy: arbitrary code execution is permitted only in local. That artifact (config gate + viewWebTinker ability + middleware list) is worth having written down regardless of whether you install the package.
  • Not a lever for: customer features, revenue, retention, or competitive differentiation. Opportunity signal is weak (small utility, narrow surface, no dependents of note). Don't let it consume roadmap oxygen or a quarterly objective.

When to Consider This Package

Adopt when:

  • The stack is Laravel/PHP and stays current (package tracks Laravel 13; PHP 8+).
  • Tinker is already part of the team's debugging habit — this is a convenience upgrade, not a new practice.
  • Dev environments are containerized, remote, or otherwise terminal-hostile, where a browser URL is genuinely faster.
  • The team is junior-heavy or growing fast and REPL exploration is a real learning path.
  • You have a hard, verifiable guarantee that APP_ENV !== local never reaches an environment holding real data.

Look elsewhere (or skip) when:

  • Anyone wants it in staging or production "just for admins." The README's own warning is the product decision: this executes arbitrary code. The default enabled => env('APP_ENV') === 'local' is the whole safety model — don't negotiate with it.
  • You need audit trails, per-user scoping, query history persistence, or read-only enforcement. Nothing here provides governance; a purpose-built internal admin console or a read-only query tool is the right shape.
  • Compliance or security policy forbids arbitrary code execution surfaces in the SDLC, even locally. Respect it; the productivity delta doesn't justify an exception.
  • You need a notebook-style workflow (saved snippets, sharing, replay). This is a REPL panel, not a data tool.
  • The team is Laravel-adjacent but not Laravel-native (e.g., heavy use of a different runtime) — the value collapses.

Adoption checklist for the PM: dev-only install (--dev), config published and reviewed, enabled untouched, viewWebTinker gate defined before anyone asks to widen it, and a one-line note in the security runbook confirming the route is unreachable outside local.

How to Pitch It (Stakeholders)

To executives (30 seconds): A free, MIT-licensed developer tool that puts Laravel's interactive console in the browser instead of the terminal. Zero license cost, ~15 minutes to adopt, contained to local development by default. Expected benefit is modest but real: faster debugging and onboarding for the PHP team. Risk is bounded by an environment gate — it cannot run outside local unless someone deliberately changes config, which we will not do. This is a hygiene improvement, not a strategic bet; approve it as a DX line item and judge it on onboarding time, not revenue.

To engineering: Install as a dev dependency, publish and commit the config, leave enabled on the APP_ENV === 'local' default, and register the viewWebTinker gate only if you have a compelling non-local case — you almost certainly don't. The package is actively maintained (Laravel 13 support, a recent Docker hang fix, and an HTML-injection patch already shipped), so pin a version, let Dependabot handle bumps, and review the changelog on majors. It exposes PsySH directly: anything you can do in php artisan tinker you can do here, including writes and deletes. Use it for exploration and read-heavy debugging; don't run migrations or destructive scripts through it, because there's no audit log and no undo. Fallback is always the terminal — nothing here replaces it, it just removes friction.

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.
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules
loco/loco
starfederation/datastar-php
yupmin/modern-phystrix
stephenjude/extended-artisan-commands
lumphp/laravel-macroable
lumphp/laravel-collections
lumphp/laravel-contracts
sermepa/sermepa
arkecosystem/fortify