Laravel 4 SQL log / console

后端 未结 8 2197
感动是毒
感动是毒 2020-12-31 05:50

Is there something similar in Laravel that allows you to see the actual SQL being executed? In Rails, for example, you can see the SQL in console. In Django you have a tool

8条回答
  •  再見小時候
    2020-12-31 06:12

    If you are using Laravel 4, use this:

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

提交回复
热议问题