json([ 'message' => str_replace('App\\', '', $exception->getModel()).' not found'], 404); } if ($exception instanceof InvalidQrCodeException) { return response()->json([ 'message' => 'not a valid QR code'], 400); } return parent::render($request, $exception); } }