Skip to content

Commit 69039b8

Browse files
authored
Laravel Readme Update (#154)
Added options column in php-laravel's Readme
1 parent 3d35d46 commit 69039b8

1 file changed

Lines changed: 16 additions & 21 deletions

File tree

  • php/sqlcommenter-php/packages/sqlcommenter-laravel
Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
1-
# sqlcommenter-laravel [In Development]
1+
# Sqlcommenter-laravel
22

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

6+
## Installation
67

7-
### Installation
8-
9-
Add this to your `composer.json`
10-
```shell
11-
"repositories": [
12-
{
13-
"type": "path",
14-
"url": "/full/or/relative/path/to/sqlcommenter-laravel/package"
15-
}
16-
]
17-
```
18-
Install the package
198
```shell
209
composer require "google/sqlcommenter-laravel"
2110
```
22-
### Usage
11+
## Usage
2312

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

2615
```shell
2716
php artisan vendor:publish --provider="Google\GoogleSqlCommenterLaravel\GoogleSqlCommenterServiceProvider"
28-
2917
```
3018

3119
Add the following class above `Illuminate\Database\DatabaseServiceProvider::class`,
@@ -38,9 +26,16 @@ Add the following class above `Illuminate\Database\DatabaseServiceProvider::clas
3826
...
3927
]
4028
```
41-
### Run unit tests
4229

43-
Run unit tests using below command
44-
```shell
45-
./vendor/bin/phpunit tests
46-
```
30+
## Options
31+
32+
With Laravel SqlCommenter, we have configuration to choose which tags to be appended to the comment. It is configurable in `config/google_sqlcommenter.php`
33+
34+
| Field | Included <br /> by default? | Description |
35+
| ------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
36+
| `action` | <div style="text-align: center">&#10004;</div> | The [application namespace](https://laravel.com/docs/9.x/controllers) of the matching URL pattern in your routes/api.php |
37+
| `controller` | <div style="text-align: center">&#10004;</div> | The [name](https://laravel.com/docs/9.x/controllers) of the matching URL pattern as described in your routes/api.php |
38+
| `db_driver` | <div style="text-align: center">&#10004;</div> | The name of the php [database engine](https://laravel.com/docs/9.x/database) |
39+
| `framework` | <div style="text-align: center">&#10004;</div> | The word "laravel" and the version of laravel being used |
40+
| `route` | <div style="text-align: center">&#10004;</div> | The [route](https://laravel.com/docs/9.x/routing) of the matching URL pattern as described in your routes/api.php |
41+
| `traceparent` | <div style="text-align: center">&#10004;</div> | The [W3C TraceContext.Traceparent field](https://www.w3.org/TR/trace-context/#traceparent-field) of the OpenTelemetry trace |

0 commit comments

Comments
 (0)