google / sqlcommenter-php

Maintains a copy of the release version of SQLCommenter-Laravel from https://github.com/google/sqlcommenter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sqlcommenter-laravel [In Development]

sqlcommenter is a plugin/middleware/wrapper to augment SQL statements from laravel with comments that can be used later to correlate user code with SQL statements.

Installation

Add this to your composer.json

"repositories": [
    {
        "type": "path",
        "url": "/full/or/relative/path/to/sqlcommenter-laravel/package"
    }
]

Install the package

composer require "google/sqlcommenter-laravel"

Usage

Publish the config file from library to into laravel app using below command

php artisan vendor:publish --provider="Google\GoogleSqlCommenterLaravel\GoogleSqlCommenterServiceProvider"

Add the following class above Illuminate\Database\DatabaseServiceProvider::class, in config/app.php

'providers' => [
    ...
    Google\GoogleSqlCommenterLaravel\Database\DatabaseServiceProvider::class,
    Illuminate\Database\DatabaseServiceProvider::class,
    ...
]

Run unit tests

Run unit tests using below command

./vendor/bin/phpunit tests

About

Maintains a copy of the release version of SQLCommenter-Laravel from https://github.com/google/sqlcommenter

License:Apache License 2.0


Languages

Language:PHP 100.0%