Handler.php 544 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Exceptions;
  3. use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  4. use Throwable;
  5. class Handler extends ExceptionHandler
  6. {
  7. /**
  8. * Render an exception into an HTTP response.
  9. *
  10. * @param \Illuminate\Http\Request $request
  11. * @param \Throwable $e
  12. * @return \Symfony\Component\HttpFoundation\Response
  13. *
  14. * @throws \Throwable
  15. */
  16. public function render($request, Throwable $e)
  17. {
  18. return response()->json(['message' => 'Oops, something went wrong']);
  19. }
  20. }