use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
-use Illuminate\Http\Response;
use Illuminate\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
HttpException::class,
ModelNotFoundException::class,
ValidationException::class,
+ NotFoundException::class,
];
/**
// Handle notify exceptions which will redirect to the
// specified location then show a notification message.
if ($this->isExceptionType($e, NotifyException::class)) {
- session()->flash('error', $this->getOriginalMessage($e));
+ $message = $this->getOriginalMessage($e);
+ if (!empty($message)) {
+ session()->flash('error', $message);
+ }
return redirect($e->redirectLocation);
}