Skip to content

Commit 7b66d50

Browse files
committed
update new readme
1 parent 5139123 commit 7b66d50

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Laravel request analyzer
22

3-
=laravel package for analyze request with timing, slow query and duplicate queries. Lot of things in bucket list. Feel free to contribute.
3+
Laravel package for analyze request with timing, slow query and duplicate queries. Lot of things in bucket list. Feel free to contribute.
44

55
## Installation
66

77
```
8-
composer require
8+
composer require kk-r/laravel-request-analyzer
99
```
1010

1111
## Configuration
@@ -16,9 +16,34 @@ Add the provider to your config/app.php:
1616
// in your config/app.php add the provider to the service providers key
1717

1818
'providers' => [
19-
/* ... */
19+
kkr\laravelRequestAnalyze\Providers\RequestAnalyzeServiceProvider::class,
20+
]
21+
```
2022

21-
'
23+
// You have add middleware for analyze requests individually
24+
####Add inside app\Http\Kernal.php in Top mention
25+
```php
26+
use kkr\laravelRequestAnalyze\Middleware\RequestAnalyze as RequestAnalyzer;
27+
```
28+
####For individual route add inside $routeMiddleware and don't forget to add middleware in Route.
29+
```php
30+
protected $routeMiddleware => [
31+
.....
32+
'RequestAnalyzer' => RequestAnalyzer::class,
33+
]
34+
```
35+
####OR for group level routes add inside middleware Groups
36+
```php
37+
protected $middlewareGroups => [
38+
.....
39+
RequestAnalyzer::class,
40+
]
41+
```
42+
####OR for all routes add middleware globally
43+
```php
44+
protected $middleware => [
45+
.....
46+
RequestAnalyzer::class,
2247
]
2348
```
2449

0 commit comments

Comments
 (0)