File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ class RestifyApplicationServiceProvider extends ServiceProvider
1414 public function boot ()
1515 {
1616 $ this ->authorization ();
17- $ this ->registerExceptionHandler ();
1817 $ this ->repositories ();
1918 }
2019
@@ -32,18 +31,6 @@ protected function repositories()
3231 Restify::repositoriesFrom (app_path ('Restify ' ));
3332 }
3433
35- /**
36- * Register Restify's custom exception handler.
37- *
38- * @return void
39- */
40- protected function registerExceptionHandler ()
41- {
42- if (config ('restify.exception_handler ' ) && class_exists (value (config ('restify.exception_handler ' )))) {
43- $ this ->app ->bind (ExceptionHandler::class, value (config ('restify.exception_handler ' )));
44- }
45- }
46-
4734 /**
4835 * Configure the Restify authorization services.
4936 *
Original file line number Diff line number Diff line change 22
33namespace Binaryk \LaravelRestify ;
44
5+ use Illuminate \Contracts \Debug \ExceptionHandler ;
56use Illuminate \Support \Facades \Route ;
67use Illuminate \Support \ServiceProvider ;
78
@@ -17,6 +18,7 @@ class RestifyServiceProvider extends ServiceProvider
1718 public function boot ()
1819 {
1920 $ this ->registerRoutes ();
21+ $ this ->registerExceptionHandler ();
2022 }
2123
2224 /**
@@ -48,4 +50,17 @@ public function defaultRoutes($config)
4850
4951 return $ this ;
5052 }
53+
54+
55+ /**
56+ * Register Restify's custom exception handler.
57+ *
58+ * @return void
59+ */
60+ protected function registerExceptionHandler ()
61+ {
62+ if (config ('restify.exception_handler ' ) && class_exists (value (config ('restify.exception_handler ' )))) {
63+ $ this ->app ->bind (ExceptionHandler::class, value (config ('restify.exception_handler ' )));
64+ }
65+ }
5166}
You can’t perform that action at this time.
0 commit comments