From 9ef95ce01c7869ce511a693a967a5ca7fd9c8b54 Mon Sep 17 00:00:00 2001 From: Jens Segers Date: Tue, 3 May 2016 18:27:26 +0200 Subject: [PATCH] Update readme with conditional service provider registration --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c76ef8f..f14ac54 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ Install using composer: Add the service provider to the `'providers'` array in `config/app.php`: Jenssegers\Rollbar\RollbarServiceProvider::class, + +If you only want to enable Rollbar reporting for certain environments you can conditionally load the service provider in your `AppServiceProvider`: + +```php +if ($this->app->environment('production')) { + $this->app->register(Jenssegers\Rollbar\RollbarServiceProvider::class); +} +``` Configuration -------------