An open API service indexing awesome lists of open source software.

https://github.com/lemberg/laravel-query-logs


https://github.com/lemberg/laravel-query-logs

Last synced: 7 months ago
JSON representation

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.