Skip to content

Commit

Permalink
tweaking docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 29, 2013
1 parent c9f6594 commit 5cdc8ee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions database.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ Sometimes you may need to reconnect to a given database:
By default, Laravel keeps a log in memory of all queries that have been run for the current request. However, in some cases, such as when inserting a large number of rows, this can cause the application to use excess memory. To disable the log, you may use the `disableQueryLog` method:

DB::connection()->disableQueryLog();
To get the executed queries from the log, it is possible to do so

To get an array of the executed queries, you may use the `getQueryLog` method:

$queries = DB::getQueryLog();
$last_query = end($queries);

0 comments on commit 5cdc8ee

Please sign in to comment.