Download the PHP package mortenscheel/laravel-query-recorder without Composer
On this page you can find all versions of the php package mortenscheel/laravel-query-recorder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mortenscheel/laravel-query-recorder
More information about mortenscheel/laravel-query-recorder
Files in mortenscheel/laravel-query-recorder
Package laravel-query-recorder
Short Description A package to record and analyze database queries in Laravel applications.
License MIT
Informations about the package laravel-query-recorder
Laravel Query Recorder
A package to record and analyze database queries in Laravel applications.
Installation
You can install the package via composer:
Usage
This package comes with a couple of recorders.
Recording all queries to CSV
The package includes a CSV recorder that can write all queries to a CSV file. Example use in a controller:
The CSV file will include:
- Query time (ms)
- Origin (file and line number)
- SQL query (raw)
Record duplicate queries to CSV
This recorder will only show duplicate queries, grouped by both sql and origin. There will be one row per unique sql+origin, containing:
- Count
- Total time (ms)
- Origin
- SQL
Custom Recorders
You can create your own custom recorder by implementing the RecordsQueries
interface:
Usage example:
Query Origin Tracking
One of the key features of this package is the ability to identify where in your code a query is being executed:
This is especially helpful for debugging and optimizing database queries in your application.
Listening for Queries
This is similar to Laravel's DB::listen()
except you receive a RecordedQuery
with extra metadata.
Testing
Security
If you discover any security related issues, please email the author instead of using the issue tracker.
Credits
- Morten Scheel
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-query-recorder with dependencies
illuminate/contracts Version ^11|^12
illuminate/support Version ^11|^12
mortenscheel/tracer Version ^0
nunomaduro/termwind Version ^2.3