Search by

QZ Tray Connector bridges Laravel and your frontend through a unified abstraction for QZ Tray integration.

Package info

github.com/artisan-toolbox/qztray

Language:TypeScript

pkg:composer/artisan-toolbox/qztray

Fund package maintenance!

artisan-toolbox

Statistics

Installs: 226

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.2.0 2026-11-04 18:44 UTC

This package is auto-updated.

Last update: 2026-11-04 18:45:13 UTC


README

QZ Tray Connector

Release PHP Laravel Node.js Tests Docs

Connect Laravel applications to local printers and preview ZPL labels, ESC/POS receipts, and PDFs.

Installation

Install the connector and Ziggy through Composer. Then install the frontend package from the Composer vendor directory.

composer require artisan-toolbox/qztray tightenco/ziggy:^2.0
npm install ./vendor/artisan-toolbox/qztray

The Composer distribution includes the compiled frontend and renderer assets; no npm registry publication or library build in the application is required.

Requires PHP 8.5 with OpenSSL and Laravel 13. TypeScript applications use Vite with "moduleResolution": "bundler". QZ Tray must run on the user's computer for printing. See the 1.x compatibility and API limits.

Usage

Publish the credential configuration from your Laravel application's root:

php artisan vendor:publish --tag=qztray-config

Set public_key to your complete PEM certificate and private_key to its matching PEM private key in config/qztray.php. See the credential setup guide for the full example and configuration cache steps. Connection, printer discovery, ESC/POS, ZPL, generic raw, PDF printing, and local ZPL, ESC/POS, and PDF previews are available in the 1.x series.

The frontend package exports a shared QzTray instance:

import qztray from '@artisan-toolbox/qztray';

await qztray.connect();
console.log(qztray.isConnected());

The application must use Ziggy (tightenco/ziggy and ziggy-js) and expose the connector's named routes to the frontend. Start with the quickstart and API overview; detailed printing, preview, error, and development guides live in the canonical documentation.

Resources