Laravel 5.3 - How to log all queries on a page?

后端 未结 7 1577
生来不讨喜
生来不讨喜 2020-12-24 12:48

My team and I are working on a rather big project. There\'s queries going on everywhere - in controllers, in view composers in views (lazy loading) and probably in some othe

7条回答
  •  梦谈多话
    2020-12-24 13:39

    Additioanlly There's package available also:

    log-my-queries

    https://packagist.org/packages/technoknol/log-my-queries

    Just install and add it's entry to middleware. It will log all the queries in laravel.log default log file.

提交回复
热议问题