Created
May 4, 2014 05:59
-
-
Save thewinterwind/0519cc64c65a56bb7d1e to your computer and use it in GitHub Desktop.
Log Laravel 4 Database Queries to the Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (App::environment() == 'local') | |
@foreach (DB::getQueryLog() as $query) | |
<script>console.log(' {{ $query['query'] . ' (' . $query['time'] . ' secs)' }} ')</script> | |
@endforeach | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment