Skip to content

Commit 5c31f16

Browse files
committed
Tweak and enhance readme readability
1 parent d18401d commit 5c31f16

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ Rollbar\Laravel\RollbarServiceProvider::class,
3131
If you only want to enable Rollbar reporting for certain environments you can conditionally load the service provider in your `AppServiceProvider`:
3232

3333
```php
34-
if ($this->app->environment('production')) {
35-
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
34+
public function register()
35+
{
36+
if ($this->app->environment('production')) {
37+
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
38+
}
3639
}
3740
```
3841

@@ -58,10 +61,10 @@ Usage
5861
To automatically monitor exceptions, simply use the `Log` facade in your error handler in `app/Exceptions/Handler.php`:
5962

6063
```php
61-
public function report(Exception $e)
64+
public function report(Exception $exception)
6265
{
63-
\Log::error($e);
64-
return parent::report($e);
66+
\Log::error($exception);
67+
return parent::report($exception);
6568
}
6669
```
6770

0 commit comments

Comments
 (0)