Kernel.php 919 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php namespace App\Http;
  2. use Exception;
  3. use Illuminate\Foundation\Http\Kernel as HttpKernel;
  4. class Kernel extends HttpKernel {
  5. /**
  6. * The application's HTTP middleware stack.
  7. *
  8. * @var array
  9. */
  10. protected $middleware = [
  11. 'App\Http\Middleware\UnderMaintenance',
  12. 'Illuminate\Cookie\Middleware\EncryptCookies',
  13. 'Illuminate\Cookie\Middleware\AddQueuedCookiesToRequest',
  14. 'Illuminate\Session\Middleware\ReadSession',
  15. 'Illuminate\Session\Middleware\WriteSession',
  16. 'Illuminate\View\Middleware\ShareErrorsFromSession',
  17. 'App\Http\Middleware\VerifyCsrfToken',
  18. ];
  19. /**
  20. * Handle an incoming HTTP request.
  21. *
  22. * @param \Illuminate\Http\Request $request
  23. * @return \Illuminate\Http\Response
  24. */
  25. public function handle($request)
  26. {
  27. try
  28. {
  29. return parent::handle($request);
  30. }
  31. catch (Exception $e)
  32. {
  33. $this->reportException($e);
  34. return $this->renderException($request, $e);
  35. }
  36. }
  37. }