Skip to content

Instantly share code, notes, and snippets.

@milosh012
Last active December 28, 2015 05:49
Show Gist options
  • Save milosh012/7452864 to your computer and use it in GitHub Desktop.
Save milosh012/7452864 to your computer and use it in GitHub Desktop.
Laravel people! Want to find out what SQL queries are run when you are going on some route... Simplest way is to specify event listener in the routes file. Here is example:
<?php
// routes.php
Event::listen('illuminate.query', function($sql) {
var_dump($sql);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment