PHPackages                             max13/laravel-barcode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. max13/laravel-barcode

ActiveLibrary

max13/laravel-barcode
=====================

Laravel package to manage and generate barcodes

v0.3.2(5y ago)0241MITPHPPHP ^7.3|^7.4|^8.0

Since Jan 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Max13/laravel-barcode)[ Packagist](https://packagist.org/packages/max13/laravel-barcode)[ Docs](https://github.com/max13/laravel-barcode)[ GitHub Sponsors](https://github.com/sponsors/max13)[ Fund](https://adnan.rihan.fr/)[ RSS](/packages/max13-laravel-barcode/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (7)Used By (0)

Laravel package to manage and create barcodes
=============================================

[](#laravel-package-to-manage-and-create-barcodes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/daa55c026ee8d348368cc1cadc2dd6c017bee2636d6015c9bc8c6aeeb58e90b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d617831332f6c61726176656c2d626172636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Max13/laravel-barcode)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1112d9fbc5d8f4f8a5a7fec35dfe4045f590f8ff925e41d80d5118404c995a89/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f4d617831332f6c61726176656c2d626172636f64652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/Max13/laravel-barcode/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/2857df664c22bbde64b60a3d7b6a565fd05708f327e99e4b95bfd4f3f19a6293/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d617831332f6c61726176656c2d626172636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Max13/laravel-barcode)

With this package you can manage barcodes (external barcodes, checkings, etc…) or generate your own as long as you configure it correctly.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require max13/laravel-barcode
```

This package embeds corresponding fonts to write the barcode on a webpage. You will see how to use them in the [Usage](#Usage) section below.

Configuration
-------------

[](#configuration)

`Barcode` types are available like so (defaults to `ean13`):

typehas fontean8yesean13yesTo change the barcode type used, set to your `.env` file: `BARCODE_TYPE=` with the barcode type you want to use.

When a barcode has a font and you would use it, you need to publish the package assets using:

```
php artisan vendor:publish --provider="Max13\Barcode\ServiceProvider" --tag=public
```

Don’t forget to include the css files in your layouts.

If you need to see or change this package config file, you can publish the config file using this command:

```
php artisan vendor:publish --provider="Max13\Barcode\ServiceProvider" --tag=config
```

This will export the config file to your app’s config folder.

Usage
-----

[](#usage)

```
// To check an ean13 barcode:
if (Barcode::isValid('0123456789104')) {
    // This barcode is valid
}

// To calculate an ean13 barcode check digit (the last digit)
echo Barcode::checksum('012345678910'); // Show: '4'

// To fix an ean13 barcode if it's needed
echo Barcode::fix('0123456789100'); // Show: '0123456789104'
```

And finally, if you need to write the barcode using the embedded font, you need to get the encoded form of the barcode (ex: in case of `ean13`, the font will be applied on html class `f-ean13`):

```
{{ Barcode::encode('0123456789104') }}
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Adnan RIHAN](https://github.com/Max13)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

6

Last Release

1910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f58025c70c91c6aee6bde0b0687627b7fefacead84240694cb72b34b81ffc195?d=identicon)[Max13](/maintainers/Max13)

---

Top Contributors

[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (12 commits)")

---

Tags

barcodemax13

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/max13-laravel-barcode/health.svg)

```
[![Health](https://phpackages.com/badges/max13-laravel-barcode/health.svg)](https://phpackages.com/packages/max13-laravel-barcode)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
