https://github.com/lemberg/laravel-query-logs
https://github.com/lemberg/laravel-query-logs
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lemberg/laravel-query-logs
- Owner: lemberg
- License: mit
- Created: 2018-02-14T13:14:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-27T11:44:26.000Z (over 5 years ago)
- Last Synced: 2024-12-27T10:44:27.170Z (over 1 year ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Query Logs
Log database queries into file.
## Requirements
* PHP >= `7.0`
* Laravel = `5.4.*|5.5.*`
## Getting Started
Install package via composer
```
$ composer require lemberg/laravel-query-logs
```
### Register Service Provider (Only for Laravel 5.4)
```
'providers' => [
Lemberg\LaraveQueryLogs\ServiceProvider::class,
],
```
### Publish Configuration File
```
php artisan vendor:publish --provider="Lemberg\LaravelQueryLogs\ServiceProvider" --tag="config"
```
## Usage
1. Add `QUERY_LOGS=true` to .env file.
2. By default queries will store into `/storage/logs/sql.log` file.
You can change it by editing the `path` option in `query-log.php` file
Actually that's all:)
## License
Please see [License File](LICENSE.md) for more information.