Skip to content

Commit ca2b163

Browse files
authored
Merge pull request #21 from adamhopkinson/adamhopkinson-use-env
Updated config to look for an env setting to enable/disable
2 parents 79d67e2 + 9ed7207 commit ca2b163

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ServerTiming::addMetric('User: '.$user->id);
9494
The configuration file could be published using:
9595
`php artisan vendor:publish --tag=server-timing-config`
9696

97-
You can disable the middleware changing the `timing.enabled` configuration to false.
97+
You can disable the middleware by changing the `timing.enabled` configuration to false or adding `SERVER_TIMING_ENABLED=false` to your `.env` file.
9898

9999
### Testing
100100

src/config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
|
1212
*/
1313

14-
'enabled' => true,
14+
'enabled' => env('SERVER_TIMING_ENABLED', true),
1515
];

0 commit comments

Comments
 (0)