adamgaskins / barcoder
A classy package to generate SVG barcodes for the web.
Fund package maintenance!
adamgaskins
Installs: 5 922
Dependents: 0
Suggesters: 0
Security: 0
Stars: 68
Watchers: 3
Forks: 0
Open Issues: 2
Requires
- php: ^7.4|^8.0
- ext-gd: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
- spatie/phpunit-snapshot-assertions: ^4.2
README
A classy package to generate SVG barcodes for the web.
Installation
You can install the package via composer:
composer require adamgaskins/barcoder
Usage
See below for a full list of supported barcode types.
QR Code
Barcoder::qrcode('data to encode')->toSvg();
Datamatrix
Barcoder::datamatrix('data to encode')->toSvg();
Code 128
Barcoder::code128('data to encode')->toSvg(); Barcoder::code128('data to encode')->hideLabel()->toSvg();
EAN-8
Barcoder::ean8('12345678')->toSvg(); Barcoder::ean8('12345678')->hideLabel()->toSvg();
EAN-13
Barcoder::ean8('1234567890123')->toSvg(); Barcoder::ean8('1234567890123')->hideLabel()->toSvg();
UPC-A
Barcoder::upca('123456789012')->toSvg(); Barcoder::upca('123456789012')->hideLabel()->toSvg();
UPC-E
Barcoder::upce('123456')->toSvg(); Barcoder::upce('123456')->hideLabel()->toSvg();
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.