Skip to content

Commit

Permalink
Better naming params, and update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Oct 30, 2023
1 parent eb0e384 commit f72e2f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ Or you can create a callback for `traceLine` for even more control:
],
```

> For activate the debug toolbar, add in your config/params.php file in your application.
```php
return [
'yii2.debug' => true,
];
```

> For change allowed IPs, add in your config/params.php file in your application.
```php
return [
'yii2.debug.allowedIPs' => ['192.168.1.1'],
];

## Testing

[Check the documentation testing](/docs/testing.md) to learn about testing.
Expand Down
4 changes: 2 additions & 2 deletions config/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*/
$debug = [];

if (isset($params['yii.debug']) && $params['yii.debug'] === true) {
if (isset($params['yii2.debug']) && $params['yii2.debug'] === true) {
$debug = [
// configuration adjustments for 'dev' environment
'modules' => [
'debug' => [
'class' => Module::class,
'allowedIPs' => $params['yii.debug.allowedIPs'] ?? ['127.0.0.1', '::1'],
'allowedIPs' => $params['yii2.debug.allowedIPs'] ?? ['127.0.0.1', '::1'],
],
],
];
Expand Down

0 comments on commit f72e2f1

Please sign in to comment.