LaraDumps
  • What is LaraDumps?
  • Get Started
    • Installation
    • Configuration
  • Commands
    • Simple
    • Color
    • Log Application
    • Show queries
    • Clear History
    • Custom Label
    • JSON Validate
    • Contains
    • Table
    • Screens
    • Diff
    • Model
  • Reference
    • Livewire
  • App
    • Host
    • IDE
Powered by GitBook
On this page
  1. Commands

Show queries

PreviousLog ApplicationNextClear History

Last updated 2 years ago

if you want to allow capturing of application queries and logs

To listen and capture Laravel SQL queries and Logs, modify the configuration at config/laradumps.php. Both options are enabled by default.

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:

It doesn't need to be enabled in the config/laradumps.php

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