Skip to content

Commit

Permalink
Merge pull request #21 from adamhopkinson/adamhopkinson-use-env
Browse files Browse the repository at this point in the history
Updated config to look for an env setting to enable/disable
  • Loading branch information
mechelon authored Mar 18, 2024
2 parents 79d67e2 + 9ed7207 commit ca2b163
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ServerTiming::addMetric('User: '.$user->id);
The configuration file could be published using:
`php artisan vendor:publish --tag=server-timing-config`

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

### Testing

Expand Down
2 changes: 1 addition & 1 deletion src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
|
*/

'enabled' => true,
'enabled' => env('SERVER_TIMING_ENABLED', true),
];

0 comments on commit ca2b163

Please sign in to comment.