Kernel.php 873 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\AddQueuedCookiesToResponse',
  14. 'Illuminate\Session\Middleware\StartSession',
  15. 'Illuminate\View\Middleware\ShareErrorsFromSession',
  16. 'App\Http\Middleware\VerifyCsrfToken',
  17. ];
  18. /**
  19. * Handle an incoming HTTP request.
  20. *
  21. * @param \Illuminate\Http\Request $request
  22. * @return \Illuminate\Http\Response
  23. */
  24. public function handle($request)
  25. {
  26. try
  27. {
  28. return parent::handle($request);
  29. }
  30. catch (Exception $e)
  31. {
  32. $this->reportException($e);
  33. return $this->renderException($request, $e);
  34. }
  35. }
  36. }