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.
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).composer require --dev is a fraction of the cost of owning that. MIT license, Spatie-maintained, 1.2k stars — free with a credible maintainer.local. That artifact (config gate + viewWebTinker ability + middleware list) is worth having written down regardless of whether you install the package.Adopt when:
APP_ENV !== local never reaches an environment holding real data.Look elsewhere (or skip) when:
enabled => env('APP_ENV') === 'local' is the whole safety model — don't negotiate with it.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.
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.
How can I help you explore Laravel packages today?