> For the complete documentation index, see [llms.txt](https://lara-dumps.gitbook.io/laradumps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lara-dumps.gitbook.io/laradumps/commands/show-queries.md).

# Show queries

if you want to allow capturing of application queries and logs

{% hint style="info" %}
To listen and capture Laravel SQL queries and Logs, modify the configuration at *`config/laradumps.php`*. Both options are enabled by default.
{% endhint %}

```php
ds()->queriesOn('label');

$db = Dish::query()->where('id', 20)->get()

ds()->queriesOff();
```

You can also capture the query using the 'ds()' macro method before the call:

{% hint style="info" %}
It doesn't need to be enabled in the *`config/laradumps.php`*
{% endhint %}

```php
Dish::query()->where('id', 20)->ds()->get()
```

![](https://1925282274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDBDrn5ZBe2jpKcdmPPrl%2Fuploads%2Fgit-blob-9460d53357f39f543b5311bab8814efb0b25a98f%2Fqueries.png?alt=media)
