{"repo":"dietercoopman/laravel-showsql","free":true,"listed":false,"github":"https://github.com/dietercoopman/laravel-showsql","clone":"git clone https://github.com/dietercoopman/laravel-showsql.git","description":"A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.","language":"PHP","stars":212,"topics":["laravel","sql"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to draw the attention and look into one single sql while you are developing. You can look up your sql in your favourite debugging tool in the sql tab , but most of the time your sql is not the only sql executed ... So the searching begins. With this package you can add showSql() to your QueryBuilder and the single sql will be outputted to the logging of your debug tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser. By default, showSql will try to log to Ray, Clockwork or the Laravel Debugbar if one of them is installed. If all installed it will be output to all. If you want your own log implementation you can pass a callback to showSql. If you want to change this behaviour you can publish the config file and change it. Compatibility This package can be installed in Laravel 6,7,8,9,10,11 and 12 Installation Examples This is an example log output Configuration You can publish the config file with the following command Laravel showsql is default configured to output to ray,clockwork and laravel debugbar. If you want to change this you can do it in the published config file. Why is this not available in the core of Laravel? I've created a pull request to the framework that has been declined. It adds too much extra logic to the framework itself. The queries as generated i","default_branch":null,"files":null,"tree":[],"storefront":"/r/dietercoopman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dietercoopman/laravel-showsql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}