All Projects → moin786 → laravel-barcode-generator

moin786 / laravel-barcode-generator

Licence: other
Generate multiple barcode in Laravel as well as in core PHP for your project, Very easy to install and easy to manage, no difficulties or no complexities for use, keep always smile. :)

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-barcode-generator

laracash
PHP Laravel Money Package 💰
Stars: ✭ 52 (+205.88%)
Mutual labels:  facade
Seotools
SEO Tools for Laravel
Stars: ✭ 2,406 (+14052.94%)
Mutual labels:  facade
barcode-java
Java Barcode Image Generation Library
Stars: ✭ 18 (+5.88%)
Mutual labels:  barcode
dotnet-design-patterns-samples
The samples of .NET design patterns
Stars: ✭ 25 (+47.06%)
Mutual labels:  facade
laravel-s3-tools
This Laravel package contains additional functionality not currently in Laravel for interfacing with Amazon's S3 service (including managing versioned objects).
Stars: ✭ 31 (+82.35%)
Mutual labels:  facade
scalajs-react-material-ui
Scala.js wrapper of http://material-ui.com for use with https://github.com/japgolly/scalajs-react
Stars: ✭ 29 (+70.59%)
Mutual labels:  facade
Qrcodereader
Barcode and QR code reader built in Swift
Stars: ✭ 237 (+1294.12%)
Mutual labels:  barcode
jQuery.EAN13
A jQuery & plain JavaScript library for generating EAN13-barcodes
Stars: ✭ 45 (+164.71%)
Mutual labels:  barcode
Design patterns in typescript
📐 Design pattern implementations in TypeScript
Stars: ✭ 4,072 (+23852.94%)
Mutual labels:  facade
MVBarcodeReader
A Barcode scanner library for Android. Uses the Google Play Services' mobile vision api for barcode detection.
Stars: ✭ 67 (+294.12%)
Mutual labels:  barcode
win det heatmaps
Window Detection in Facade Using Heatmaps Fushion
Stars: ✭ 29 (+70.59%)
Mutual labels:  facade
yii2-facades
Facades for Yii 2
Stars: ✭ 21 (+23.53%)
Mutual labels:  facade
oh-my-design-patterns
🎨 Record the articles and code I wrote while learning design patterns
Stars: ✭ 33 (+94.12%)
Mutual labels:  facade
zipcode
ZipCode Cep do Brazil
Stars: ✭ 43 (+152.94%)
Mutual labels:  facade
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (+82.35%)
Mutual labels:  barcode
Python Barcode
㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.
Stars: ✭ 241 (+1317.65%)
Mutual labels:  barcode
taro-code
Taro Barcode & QRCode
Stars: ✭ 88 (+417.65%)
Mutual labels:  barcode
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+241.18%)
Mutual labels:  barcode
api2pdf.php
PHP client library for the Api2Pdf.com REST API - Convert HTML to PDF, URL to PDF, Office Docs to PDF, Merge PDFs, HTML to Image, URL to Image, HTML to Docx, HTML to Xlsx, PDF to HTML, Thumbnail preview of office files
Stars: ✭ 42 (+147.06%)
Mutual labels:  barcode
ZZYQRCode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 124 (+629.41%)
Mutual labels:  barcode

laravel-barcode-generator

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

Inside your project root directory, open your terminal

composer require peal/laravel-barcode-generator

Composer will automatically download all dependencies.

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

//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 '<img alt="testing" src="'.$barcontent.'"/>';    


//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 '<img alt="testing" src="'.$barcontent.'"/>';    

Multiple barcode

//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'
            ],
            [
                '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) {
        $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 '<img alt="testing" src="'.$barcontent.'"/>';    
            
        
        
    }


    //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'
            ],
            [
                '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) {
        $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 '<img alt="testing" src="'.$barcontent.'"/>';    
            
        
        
    }

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 '<img alt="testing" src="'.$barcontent.'"/>';  
        
        
//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 '<img alt="testing" src="'.$barcontent.'"/>';  


//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 '<img alt="testing" src="'.$barcontent.'"/>';    
            
        
        
    }

For core php

    
use peal\barcodegenerator\Server\BarCodeServer;
use peal\barcodegenerator\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 '<img alt="testing" src="'.$barcontent.'"/>';    

//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'
        ],
];


$barcontent = new BarCodeServer(new BarCode());

foreach($barcodes as $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 '<img alt="testing" src="'.$barcontent.'"/>';    
        


}

Author

Mohammed Minuddin(Peal)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].