diff --git a/README.md b/README.md index a682ba6..bcf1d42 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/config/config.php b/src/config/config.php index 07708db..65ce80e 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -11,5 +11,5 @@ | */ - 'enabled' => true, + 'enabled' => env('SERVER_TIMING_ENABLED', true), ];