Reference sheet
Every helper and method, with a link to the page that explains it.
PHP
| Call | Description | Details |
|---|---|---|
ds($a, $b) | Dump one or more values | Dump |
ds($a)->die() | Dump and stop execution | Dump and die |
dsd($a) | Alias for dump and die | Dump and die |
dsq($a) | Dump without bringing the app forward | Quiet dump |
->label('Name') | Name the dump | Label |
->toScreen('name', $raiseIn) | Send to a screen; optional delay in seconds | Screens |
->s('name') | Alias for toScreen() | Screens |
->toScreenWindow('name') | Send to a screen in a new window | Screens |
->w('name') | Alias for toScreenWindow() | Screens |
ds()->clear() | Clear all screens | Clear screens |
->info() / ->blue() | Blue tag | Color tag |
->success() / ->green() | Green tag | Color tag |
->danger() / ->red() | Red tag | Color tag |
->warning() / ->orange() | Orange tag | Color tag |
->dark() / ->black() | Black tag | Color tag |
->color('red') | Tag with a color by name | Color tag |
ds()->time('ref'), ds()->stopTime('ref') | Measure execution time | Time |
ds()->table($data, 'name') | Show data in a searchable table | Table |
->isJson() | Validate and format a JSON string | JSON |
->contains('text', caseSensitive: false, wholeWord: false) | Check if the dump contains a string | Contains |
ds()->phpinfo() | Show PHP settings | PHPInfo |
ds()->benchmark(...$closures) | Time closures and flag the fastest | Benchmark |
Laravel
| Call | Description | Details |
|---|---|---|
ds()->routes() | Show routes in a table | Routes |
ds()->model($user) | Show a model's attributes and relationships | Eloquent models |
str('Hello')->ds() | Dump a Stringable and keep chaining | Macros and Blade |
collect($items)->ds() | Dump a collection and keep chaining | Macros and Blade |
User::query()->ds() | Dump an Eloquent builder's query | Macros and Blade |
@ds($var) | Dump from a Blade view | Macros and Blade |
ds()->queriesOn('label'), ds()->queriesOff() | Start and stop capturing SQL queries | Queries |
ds()->markdown('# Hello') | Render markdown as HTML | Table and Markdown |
ds()->mailable(new TestMail()) | Show mail details and an HTML preview | |
ds()->httpOn('label'), ds()->httpOff() | Start and stop capturing HTTP client requests | HTTP client |
ds()->commandsOn('label'), ds()->commandsOff() | Start and stop capturing Artisan commands | Artisan commands |
ds()->scheduledCommandOn('label'), ds()->scheduledCommandOff() | Start and stop capturing scheduled commands | Scheduled commands and gates |
ds()->gateOn('label'), ds()->gateOff() | Start and stop capturing gate and policy checks | Scheduled commands and gates |
ds()->cacheOn('label'), ds()->cacheOff() | Start and stop capturing cache events | Cache |
ds()->withContext('key') | Show Laravel Context, optionally filtered by key | Context |
ds()->startProfile('label'), ds()->stopProfile() | Start and stop a profile | Not documented yet |
ds()->profile($callback, 'label') | Profile a closure and return its result | Not documented yet |
ds()->measure($name, $callback, $type, $metadata) | Measure a closure inside a profile | Not documented yet |
ds()->flushProfile(), ds()->captureProfileForTermination() | Send or finalize the current profile data | Not documented yet |
Livewire and Volt
| Call | Description | Details |
|---|---|---|
#[Ds] | Listen to a Livewire component | Pin a component |
booted(fn () => ds($this)) | Listen to a Volt component | Pin a Volt component |
Pest
| Call | Description | Details |
|---|---|---|
expect($value)->ds() | Dump an expectation value | Expectations |
$response->ds() | Dump a test response | Test responses |