PHPackages                             peal/laravel-barcode-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. peal/laravel-barcode-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

peal/laravel-barcode-generator
==============================

Barcode generate in Laravel

v1.4.5(1y ago)1617.3k↓25%6[2 PRs](https://github.com/moin786/laravel-barcode-generator/pulls)MITPHP

Since Aug 24Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/moin786/laravel-barcode-generator)[ Packagist](https://packagist.org/packages/peal/laravel-barcode-generator)[ RSS](/packages/peal-laravel-barcode-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (13)Used By (0)

laravel-barcode-generator
=========================

[](#laravel-barcode-generator)

Generate Barcode using Laravel &amp; Core PHP
=============================================

[](#generate-barcode-using-laravel--core-php)

This package generate different types of barcode using Laravel as well as using core PHP.

Note: For this package you have to enable gd library.

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

[](#installation)

Inside your project root directory, open your terminal

```
composer require Peal/laravel-barcode-generator
```

Composer will automatically download all dependencies.

#### For Laravel

[](#for-laravel)

After complete the installation, open your app.php from config folder, paste below line inside providers array

```
Peal\BarCodeGenerator\BarcodeServiceProvider::class,
```

For Facade support, paste below line inside aliases array

```
'BarCode' => peal\barcodegenerator\Facades\BarCode::class,
```

### USAGES

[](#usages)

```
//Generate into barcode folder under public
$bar = App::make('BarCode');
$barcodes = [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg'
            ];
$barcontent = $bar->barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename']
                            )->filename($barcode['filename']);

echo '';

//Generate into customize folder under public
$bar = App::make('BarCode');
$barcodes = [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg',
                'filepath' => 'prdbarcode'
            ];
$barcontent = $bar->barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename'],
                                    $filepath = $barcode['filepath']
                            )->filename($barcode['filename']);

echo '';
```

### Multiple barcode

[](#multiple-barcode)

```
//Generate into barcode folder under public

$barcodes = [
            [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg'
            ],
            [
                'text' => 'HelloPeal',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image2.jpeg'
            ],
            [
                'text' => 'Hi Ruhul',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code128b',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image3.jpeg'
            ],
            [
                'text' => 'HelloMahian',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image4.jpeg'
            ],
        ];

    foreach($barcodes as $barcode) {
        $bar = App::make('BarCode');
        $barcontent = $bar->barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename']
                            )->filename($barcode['filename']);

        echo '';

    }

    //Generate into customize folder under public

$barcodes = [
            [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg',
                'filepath' => 'prdbarcode'
            ],
            [
                'text' => 'HelloPeal',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image2.jpeg',
                'filepath' => 'prdbarcode'
            ],
            [
                'text' => 'Hi Ruhul',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code128b',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image3.jpeg',
                'filepath' => 'prdbarcode'
            ],
            [
                'text' => 'HelloMahian',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image4.jpeg',
                'filepath' => 'prdbarcode'
            ],
        ];

    foreach($barcodes as $barcode) {
        $bar = App::make('BarCode');
        $barcontent = $bar->barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename'],
                                    $filepath = $barcode['filepath'],
                            )->filename($barcode['filename']);

        echo '';

    }
```

### Using Facades

[](#using-facades)

```
use peal\BarCodeGenerator\Facades\BarCode;

//Single barcode
//Generate into barcoce folder under public

$barcodes = [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg'
            ];
$barcontent = BarCode::barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename']
                            )->filename($barcode['filename']);

        echo '';

//Generate into customize folder under public
$barcodes = [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg',
                'filepath' => 'prdbarcode'
            ];
$barcontent = BarCode::barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename'],
                                    $filepath = $barcode['filepath'],
                            )->filename($barcode['filename']);

        echo '';

//Multiple barcode

/**
 * For customize folder name, use filepath key and parameter
 */

$barcodes = [
            [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image1.jpeg'
            ],
            [
                'text' => 'HelloPeal',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image2.jpeg'
            ],
            [
                'text' => 'Hi Ruhul',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code128b',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image3.jpeg'
            ],
            [
                'text' => 'HelloMahian',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image4.jpeg'
            ],
            [
                'text' => 'HelloHello',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image5.jpeg'
            ],
            [
                'text' => 'HelloPeal',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image6.jpeg'
            ],
            [
                'text' => 'Hi Ruhul',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code128b',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image7.jpeg'
            ],
            [
                'text' => 'HelloMahian',
                'size' => 50,
                'orientation' => 'horizontal',
                'code_type' => 'code39',
                'print' => true,
                'sizefactor' => 1,
                'filename' => 'image8.jpeg'
            ],
        ];

    foreach($barcodes as $barcode) {
        $barcontent = BarCode::barcodeFactory()->renderBarcode(
                                    $text=$barcode["text"],
                                    $size=$barcode['size'],
                                    $orientation=$barcode['orientation'],
                                    $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                    $print=$barcode['print'],
                                    $sizefactor=$barcode['sizefactor'],
                                    $filename = $barcode['filename']
                            )->filename($barcode['filename']);

        echo '';

    }
```

### For core php

[](#for-core-php)

```

use Peal\BarCodeGenerator\Server\BarCodeServer;
use Peal\BarCodeGenerator\BarCodeType\BarCode;

//single barcode

$barcodes = [
        'text' => 'HelloHello',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image1.jpeg'
        ];
$barcontent = new BarCodeServer(new BarCode());

$barcontent = $barcontent->barcodeFactory()->renderBarcode(
                                $text=$barcode["text"],
                                $size=$barcode['size'],
                                $orientation=$barcode['orientation'],
                                $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                $print=$barcode['print'],
                                $sizefactor=$barcode['sizefactor'],
                                $filename = $barcode['filename']
                        )->filename($barcode['filename']);

echo '';

//Multiple barcode

$barcodes = [
        [
        'text' => 'HelloHello',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image1.jpeg'
        ],
        [
        'text' => 'HelloPeal',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image2.jpeg'
        ],
        [
        'text' => 'Hi Ruhul',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code128b',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image3.jpeg'
        ],
        [
        'text' => 'HelloMahian',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image4.jpeg'
        ],
        [
        'text' => 'HelloHello',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image5.jpeg'
        ],
        [
        'text' => 'HelloPeal',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image6.jpeg'
        ],
        [
        'text' => 'Hi Ruhul',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code128b',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image7.jpeg'
        ],
        [
        'text' => 'HelloMahian',
        'size' => 50,
        'orientation' => 'horizontal',
        'code_type' => 'code39',
        'print' => true,
        'sizefactor' => 1,
        'filename' => 'image8.jpeg'
        ],
];

foreach($barcodes as $barcode) {
$barcontent = new BarCodeServer(new BarCode());
$barcontent = $barcontent->barcodeFactory()->renderBarcode(
                                $text=$barcode["text"],
                                $size=$barcode['size'],
                                $orientation=$barcode['orientation'],
                                $code_type=$barcode['code_type'], // code_type : code128,code39,code128b,code128a,code25,codabar
                                $print=$barcode['print'],
                                $sizefactor=$barcode['sizefactor'],
                                $filename = $barcode['filename']
                        )->filename($barcode['filename']);

echo '';

}
```

### Author

[](#author)

[Mohammed Minuddin(Peal)](https://moinshareidea.wordpress.com)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance46

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 88% 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 ~321 days

Recently: every ~481 days

Total

7

Last Release

526d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/171ff00d2636607267851b5600ddb93bdeb77b62dca6f1b6c031dd6f40a3753d?d=identicon)[moin786](/maintainers/moin786)

---

Top Contributors

[![moin786](https://avatars.githubusercontent.com/u/12525167?v=4)](https://github.com/moin786 "moin786 (73 commits)")[![mprince2k18](https://avatars.githubusercontent.com/u/43857625?v=4)](https://github.com/mprince2k18 "mprince2k18 (8 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")

---

Tags

barcodefacadelaravellaravel-barcode-generatorphp

### Embed Badge

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

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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