Last active
July 7, 2022 23:50
-
-
Save ajtrichards/69c9b32d2c42484803bc to your computer and use it in GitHub Desktop.
Laravel Lumen - Display Query Log
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
/** | |
* You must enable to Query Log when using Lumen. | |
*/ | |
DB::connection()->enableQueryLog(); | |
$queries = DB::getQueryLog(); | |
$last_query = end($queries); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah your right - I have enabled on mine and I always tend to do so :)