// docs
Run Code
Write a Tinker snippet, choose a connection, and run it against a Laravel app.
Run Code is the main workspace. It combines the editor, connection selector, safety controls, output, SQL panel, tabs, saved snippets, and run history.
Tinker mode
Use Tinker mode for Laravel snippets. You can query models, call services, inspect config, dispatch code in a controlled way, or prototype a small idea against the real app context.
Run selection
Select part of a snippet to run only those lines. This is handy when you are building a longer check and want to test one small part at a time.
$order = Order::query()->latest()->first();
$order?->only(['id', 'status', 'total']);