| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | class ApiServiceProvider extends ServiceProvider |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Bootstrap the application services. |
||
| 28 | * |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | public function boot() |
||
| 32 | { |
||
| 33 | $handler = app('Dingo\Api\Exception\Handler'); |
||
| 34 | $handler->register(function (AuthenticationException $exception) { |
||
| 35 | throw new UnauthorizedHttpException(null, $exception->getMessage()); |
||
| 36 | }); |
||
| 37 | $handler->register(function (AuthorizationException $exception) { |
||
| 38 | throw new AccessDeniedHttpException($exception->getMessage()); |
||
| 39 | }); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Register the application services. |
||
| 44 | * |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function register() |
||
| 49 | // |
||
| 50 | } |
||
| 52 |