New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ageekdev/laravel-barcode

laravel barcode generator
49,654 13
Install
composer require ageekdev/laravel-barcode
Latest Version:v2.0.0
PHP:^8.2
Laravel:12 · 13
Older releases:9 · 10 · 11
License:MIT
Last Updated:Jun 22, 2026
Links: GitHub  ·  Packagist
Maintainer: tintnaingwin

Laravel Barcode

Latest Version on Packagist GitHub Tests Action Status Total Downloads Laravel 9.x Laravel 10.x Laravel 11.x Laravel 12.x Laravel 13.x

Laravel Barcode Generator

A package to generate barcodes in various formats (SVG, PNG, JPG, HTML) for Laravel applications.

⚙️ Installation

You can install the package via Composer:

composer require ageekdev/laravel-barcode

You can publish the config file with:

php artisan vendor:publish --tag="laravel-barcode-config"

Usage

use AgeekDev\Barcode\Facades\Barcode;
use AgeekDev\Barcode\Enums\BarcodeType;

$barcode = Barcode::imageType("svg")
                ->foregroundColor("#000000")
                ->height(30)
                ->widthFactor(2)
                ->type(BarcodeType::CODE_128)
                ->generate("081231723897");

Accepted barcode types

These barcode types are supported. All types support different character sets or have mandatory lengths. Please see wikipedia for supported chars and lengths per type.

Most used types are CODE_128 and CODE_39. Because of the best scanner support, variable length and most chars supported.

  • CODE_32 (italian pharmaceutical code 'MINSAN')
  • CODE_39
  • CODE_39_CHECKSUM
  • CODE_39E
  • CODE_39E_CHECKSUM
  • CODE_93
  • STANDARD_2_5
  • STANDARD_2_5_CHECKSUM
  • INTERLEAVED_2_5
  • INTERLEAVED_2_5_CHECKSUM
  • CODE_128
  • CODE_128_A
  • CODE_128_B
  • CODE_128_C
  • EAN_2
  • EAN_5
  • EAN_8
  • EAN_13
  • UPC_A
  • UPC_E
  • MSI
  • MSI_CHECKSUM
  • POSTNET
  • PLANET
  • RMS4CC
  • KIX
  • IMB
  • CODABAR
  • CODE_11
  • PHARMA_CODE
  • PHARMA_CODE_TWO_TRACKS

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

This package contains code copied from PHP Barcode Generator

License

The MIT License (MIT). Please see License File for more information.

Related Packages

joe-pritchard/laravel-ean-validator

A validator for Laravel to check for correct EAN codes

26,400 4
kelixlabs/kelix-barcode

1D and 2D barcode generator (for laravel 4)

23 0
chengkangzai/filament-qrcode-scanner-html5

A Filament form action for scanning barcodes and QR codes using the device camer...

4,448 2
gabrielesbaiz/qrcode-toolkit

A style-first QR code toolkit for Laravel: module and eye shapes, gradients, log...

3,402 0
milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+,...

16,340,838 1,480

Version History

Version Released PHP Laravel License
v2.0.0 ^8.2 ^12.0|^13.0 MIT
v1.3.0 ^8.1 ^9.0|^10.0|^11.0|^12.0 MIT
v1.2.0 ^8.1 ^9.0|^10.0|^11.0 MIT
v1.1.1 ^8.1|^8.2 ^9.0|^10.0 MIT
v1.1.0 ^8.1|^8.2 ^9.0|^10.0 MIT