Laravel getQueryLog not print if query was executed as a transaction

Viewed 18

Currently I'm testing a execution of a query using laravel 5.4. I'm trying to print is a query was executed on a transaction, for example:

\DB::enableQueryLog();
        try {
            \DB::beginTransaction();
            $item = new Item();
            $item->name = 'some name';
            // ...
            $item->save();
            \DB::commit();
            dump(\DB::getQueryLog());
        } catch (\Exception $e) {

But query log only show the information of the sql statement, but not tells me complete transaction sql:

enter image description here

I want to print the execution with the transaction.

0 Answers
Related