File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,11 @@ Rollbar\Laravel\RollbarServiceProvider::class,
31
31
If you only want to enable Rollbar reporting for certain environments you can conditionally load the service provider in your ` AppServiceProvider ` :
32
32
33
33
``` 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
+ }
36
39
}
37
40
```
38
41
@@ -58,10 +61,10 @@ Usage
58
61
To automatically monitor exceptions, simply use the ` Log ` facade in your error handler in ` app/Exceptions/Handler.php ` :
59
62
60
63
``` php
61
- public function report(Exception $e )
64
+ public function report(Exception $exception )
62
65
{
63
- \Log::error($e );
64
- return parent::report($e );
66
+ \Log::error($exception );
67
+ return parent::report($exception );
65
68
}
66
69
```
67
70
Original file line number Diff line number Diff line change 32
32
"Rollbar\\ Laravel\\ " : " src/"
33
33
}
34
34
},
35
+ "extra" : {
36
+ "laravel" : {
37
+ "providers" : [
38
+ " Rollbar\\ Laravel\\ RollbarServiceProvider"
39
+ ],
40
+ "aliases" : {
41
+ "Rollbar" : " Rollbar\\ Laravel\\ Facades\\ Rollbar"
42
+ }
43
+ }
44
+ },
35
45
"scripts" : {
36
46
"test" : [
37
47
" phpunit --coverage-clover build/logs/clover.xml" ,
You can’t perform that action at this time.
0 commit comments