0

How to throw a json response error in laravel outside the controller or any part of the application?

something like that

throw new ConflictException('any')

1 Answers1

0

you throw your exceptions and then laravel handle it automatically for Json or web when you use accept:application/json in request param

hsn u
  • 26
  • 3