Skip to content

Commit 9ef95ce

Browse files
committed
Update readme with conditional service provider registration
1 parent 24d5b72 commit 9ef95ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ Install using composer:
1717
Add the service provider to the `'providers'` array in `config/app.php`:
1818

1919
Jenssegers\Rollbar\RollbarServiceProvider::class,
20+
21+
If you only want to enable Rollbar reporting for certain environments you can conditionally load the service provider in your `AppServiceProvider`:
22+
23+
```php
24+
if ($this->app->environment('production')) {
25+
$this->app->register(Jenssegers\Rollbar\RollbarServiceProvider::class);
26+
}
27+
```
2028

2129
Configuration
2230
-------------

0 commit comments

Comments
 (0)