Query your Laravel database models interactively from the terminal to inspect live data without writing a route or controller
Create test records or run one-off scripts against your Laravel application during development without a browser
Test a specific service method or piece of business logic in your Laravel app immediately without setting up a test file
Included by default in every new Laravel project, start it with php artisan tinker from your project root.
Laravel Tinker is an interactive console tool for the Laravel web framework, a PHP framework commonly used to build web applications and APIs. REPL stands for Read-Eval-Print Loop, which describes a shell where you type a command, the tool runs it immediately, shows you the result, and then waits for the next input. Developers use this kind of tool to quickly test code, inspect data, or experiment with parts of their application without writing a full script or opening a browser. Tinker is built on top of PsySH, an open-source interactive PHP shell. Because it runs inside your Laravel application, it has access to all of your database models, configuration values, and services. This means you can query your database, create test records, or call any function in your codebase directly from the terminal. It is included by default in new Laravel projects. The README for this repository is very short. It describes Tinker in one sentence and directs readers to the official Laravel documentation website for full usage instructions. No setup steps or code examples are given here, all of that lives on the external docs site. If you use Laravel and want to quickly check what a piece of code does, look at data in your database, or run a one-off command against your application, Tinker is the built-in tool for that. You start it from the terminal using the artisan command-line interface that comes with every Laravel project. The source code is licensed under the MIT license and open to contributions.
← laravel on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.