Laravel Tinker Server Package

Laravel Tinker Server Package

Laravel Tinker Server is a package by Marcel Pociot that enables you to tinker with your variables in real-time while working on your Laravel app. This package collects data via calls to a tinker() helper that ships with the package and allow you to then interact with those variables on the fly.

Related: Laravel Dump Server

The best way to demonstrate this package is the following gif from the project’s README file:

The primary usage for this is first starting up a tinker server in a new console session:

php artisan tinker-server

Then when you call tinker() from within your code it will be instantly available in an interactive REPL shell. Here’s a basic example from the README:

$user = App\User::find(1);


Using XDebug

An alternative approach that I use which has similar benefits is setting breakpoints during an XDebug session. If you’re using a client like PhpStorm’s client/UI, you can interactively inspect variables within the scope of the call stack and run code via a console.

The nice thing about using XDebug is that it works for all PHP projects, where this approach is specific to Laravel. You can see this technique in our Learn how to set up Xdebug for PhpStorm and Laravel Valet video.

Learn More

You can learn more about the Laravel Tinker Server package at beyondcode/laravel-tinker-server. To learn how to install and use the package, check out the Laravel Tinker Server README file.

Filed in: Laravel Packages
Laravel News Partners

Laravel Jobs

Backend Software Engineer (PHP Developer)
Austin TX, Bonita Springs FL
Certified eSupport Corp
Laravel Developer
Glendale, CA (COVID Remote)
Jogg, Inc
Full-Stack Engineer (Mid to Senior)
Remote (EST, CST)
Senior Laravel Developer (AI Applications)
Remote from anywhere in the UK or from our London office
GreenShoot Labs
Full Stack Engineer


Join 31,000+ others and never miss out on new tips, tutorials, and more.