Skip to content

Instantly share code, notes, and snippets.

@khoa-le
Created February 7, 2023 09:01
Show Gist options
  • Save khoa-le/120e59dd87a3001ff30ecbf7f4494f96 to your computer and use it in GitHub Desktop.
Save khoa-le/120e59dd87a3001ff30ecbf7f4494f96 to your computer and use it in GitHub Desktop.
Get SQL Log and time execute of Laravel Query Builder
\DB::enableQueryLog(); // Enable query log
// Your Eloquent query executed by using get()
dd(\DB::getQueryLog());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment