Skip to content

Commit 95a1c4d

Browse files
authored
Update README.md
1 parent b0f0e13 commit 95a1c4d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Diff for: README.md

+21
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@ and add middleware from container to app:
5656
$app->add($app->getContainer()->get('debugbar_middleware'));
5757
```
5858

59+
### How to configure using existing factories?
60+
61+
Put array with configuration into `config` service in your container:
62+
63+
```php
64+
<?php
65+
return [
66+
'phpmiddleware' => [
67+
'phpdebugbar' => [
68+
'javascript_renderer' => [
69+
'base_url' => '/phpdebugbar',
70+
],
71+
'collectors' => [
72+
DebugBar\DataCollector\ConfigCollector::class, // Service names of collectors
73+
],
74+
'storage' => null, // Service name of storage
75+
],
76+
],
77+
];
78+
```
79+
5980
## It's just works with any modern php framework!
6081

6182
Middleware tested on:

0 commit comments

Comments
 (0)