Skip to content

Commit

Permalink
Add readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
marekskopal committed Mar 11, 2024
1 parent a868d1b commit f3858ef
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Buggregator client

Buggregator client library for xhprof as middleware.
Buggregator client library for xhprof as PSR-15 middleware.


## Install
Expand All @@ -11,5 +11,19 @@ composer require marekskopal/buggregator-client

## Usage

TBD
Use `XhprofMiddleware` class as PSR-15 middleware.

```php

use MarekSkopal\BuggregatorClient\Middleware;

$xhprofMiddleware new XhprofMiddleware(
appName: 'MyApp',
url: (string) getenv('PROFILER_ENDPOINT'),
));

//e.g. phpleague/route

$router->middleware($xhprofMiddleware);

```

0 comments on commit f3858ef

Please sign in to comment.