All Projects → milon → Barcode

milon / Barcode

Licence: other
Laravel 5 Barcode Generator

Projects that are alternatives of or similar to Barcode

Laravel template with vue
laravel5.5和vue.js结合的前后端分离项目模板,后端使用了laravel的LTS版本(5.5),前端使用了流行的vue-element-template项目。作为程序的起点,可以直接以此为基础来进行业务扩展。模板内容包括基础的用户管理和权限管理、日志管理、集成第三方登录,整合laravel-echo-server 实现了websocket 做到了消息的实时推送,并在此基础上,实现了聊天室和客服功能。权限管理包括后端Token认证和前端vue.js的动态权限,解决了前后端完整分离的情况下,vue.js的认证与权限相关的痛点,已在本人的多个项目中集成使用。
Stars: ✭ 763 (-7.63%)
Mutual labels:  laravel
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (-4.72%)
Mutual labels:  laravel
Laravel Love
Add Social Reactions to Laravel Eloquent Models. It lets people express how they feel about the content. Fully customizable Weighted Reaction System & Reaction Type System with Like, Dislike and any other custom emotion types. Do you react?
Stars: ✭ 822 (-0.48%)
Mutual labels:  laravel
Laravel Follow
❤️ This package helps you to add user based follow system to your model.
Stars: ✭ 776 (-6.05%)
Mutual labels:  laravel
Learning laravel kernel
Laravel核心代码学习
Stars: ✭ 789 (-4.48%)
Mutual labels:  laravel
Repository
Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.
Stars: ✭ 795 (-3.75%)
Mutual labels:  laravel
Twitter
Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Stars: ✭ 755 (-8.6%)
Mutual labels:  laravel
Laravel Jade
[Discontinued] Laravel package that adds Jade templating support
Stars: ✭ 5 (-99.39%)
Mutual labels:  laravel
Laravel Google Calendar
Manage events on a Google Calendar
Stars: ✭ 787 (-4.72%)
Mutual labels:  laravel
Laravel Blade Directives
A collection of nice Laravel Blade directives
Stars: ✭ 813 (-1.57%)
Mutual labels:  laravel
Laravel Adminpanel
A Laravel Admin Panel (Laravel Version : 6.0)
Stars: ✭ 774 (-6.3%)
Mutual labels:  laravel
Laravel Mailbox
Catch incoming emails in your Laravel application
Stars: ✭ 783 (-5.21%)
Mutual labels:  laravel
Laravel5 Cheatsheet
A quick reference guide (cheat sheet) for Laravel 5.1 LTS, listing artisan, composer, routes and other useful bits of information.
Stars: ✭ 799 (-3.27%)
Mutual labels:  laravel
Blade Ui Kit
A set of renderless components to utilise in your Laravel Blade views.
Stars: ✭ 763 (-7.63%)
Mutual labels:  laravel
Laravel Event Broadcast
Laravel event broadcasting with Node.js, Redis & Socket.io
Stars: ✭ 5 (-99.39%)
Mutual labels:  laravel
Laravel Ecommerce Example
Code for YouTube series on building a Laravel E-Commerce application.
Stars: ✭ 759 (-8.11%)
Mutual labels:  laravel
Laravel Widgetize
A minimal package to help you make your laravel application cleaner and faster.
Stars: ✭ 791 (-4.24%)
Mutual labels:  laravel
Adldap2 Laravel
LDAP Authentication & Management for Laravel
Stars: ✭ 825 (-0.12%)
Mutual labels:  laravel
Transit
Easy file uploading and downloading for Laravel 5.
Stars: ✭ 5 (-99.39%)
Mutual labels:  laravel
Laravel Ffmpeg
This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
Stars: ✭ 807 (-2.3%)
Mutual labels:  laravel

Packagist Downloads Stable version License

This is a barcode generation package inspired by https://github.com/tecnickcom/TCPDF. Actually, I use that package's underline classes for generating barcodes. This package is just a wrapper of that package and adds compatibility with Laravel 5.

I used the following classes of that package.

  • src/Milon/Barcode/Datamatrix.php (include/barcodes/datamatrix.php)
  • src/Milon/Barcode/DNS1D.php (tcpdf_barcodes_1d.php)
  • src/Milon/Barcode/DNS2D.php (tcpdf_barcodes_2d.php)
  • src/Milon/Barcode/PDF417.php (include/barcodes/pdf417.php)
  • src/Milon/Barcode/QRcode.php (include/barcodes/qrcode.php)

Read More on TCPDF website

This package is compatible with Laravel 4.* , 5.*, 6.*, 7.* and 8.*

This package relies on php-gd extension. So, make sure it is installed on your machine.

Installation

Begin by installing this package through Composer. Just run following command to terminal-

composer require milon/barcode

You can also edit your project's composer.json file to require milon/barcode.

"require": {
    "milon/barcode": "^8.0"
}

For Laravel 7.* use this-

"require": {
    "milon/barcode": "^7.0"
}

For Laravel 6.* use this-

"require": {
    "milon/barcode": "^6.0"
}

For Laravel 5.0 and 5.1 use this-

"require": {
    "milon/barcode": "^5.1"
}

For Laravel 4.0, 4.1 and 4.2 use this-

"require": {
    "milon/barcode": "^4.2"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the final step is to add the service provider. Open config/app.php, and add a new item to the providers array.

'providers' => [
    // ...
    Milon\Barcode\BarcodeServiceProvider::class,
]

For version 4.* add these lines on app/config/app.php file-

'providers' => array(
    // ...
    'Milon\Barcode\BarcodeServiceProvider',
)

If you want to change Bar-code's settings (Store Path etc.), you need to publish its config file(s). For that you need to run in the terminal-

# Laravel 5.x
php artisan vendor:publish

# Laravel 4.x
php artisan config:publish milon/barcode

Make sure you have write permission to the storage path. By default it sets to /storage folder.

Now add the alias.

'aliases' => [
    // ...
    'DNS1D' => Milon\Barcode\Facades\DNS1DFacade::class,
    'DNS2D' => Milon\Barcode\Facades\DNS2DFacade::class,
]

For version 4.2 alias will be like this-

'aliases' => array(
    // ...
    'DNS1D' => 'Milon\Barcode\Facades\DNS1DFacade',
    'DNS2D' => 'Milon\Barcode\Facades\DNS2DFacade',
)

Bar-code 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)

generator in html, png embedded base64 code and SVG canvas

echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T');
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T');
echo '<img src="data:image/png,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode"   />';
echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T');
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+') . '" alt="barcode"   />';
echo DNS1D::getBarcodeSVG('4445645656', 'C39');
echo DNS2D::getBarcodeHTML('4445645656', 'QRCODE');
echo DNS2D::getBarcodePNGPath('4445645656', 'PDF417');
echo DNS2D::getBarcodeSVG('4445645656', 'DATAMATRIX');
echo '<img src="data:image/png;base64,' . DNS2D::getBarcodePNG('4', 'PDF417') . '" alt="barcode"   />';

Width and Height example

echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T',3,33);
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T',3,33);
echo '<img src="' . DNS1D::getBarcodePNG('4', 'C39+',3,33) . '" alt="barcode"   />';
echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T',3,33);
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+',3,33) . '" alt="barcode"   />';

Color

echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T',3,33,'green');
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T',3,33,'green');
echo '<img src="' . DNS1D::getBarcodePNG('4', 'C39+',3,33,array(1,1,1)) . '" alt="barcode"   />';
echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T',3,33,array(255,255,0));
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+',3,33,array(1,1,1)) . '" alt="barcode"   />';

Show Text

echo DNS1D::getBarcodeSVG('4445645656', 'PHARMA2T',3,33,'green', true);
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T',3,33,'green', true);
echo '<img src="' . DNS1D::getBarcodePNG('4', 'C39+',3,33,array(1,1,1), true) . '" alt="barcode"   />';
echo DNS1D::getBarcodePNGPath('4445645656', 'PHARMA2T',3,33,array(255,255,0), true);
echo '<img src="data:image/png;base64,' . DNS1D::getBarcodePNG('4', 'C39+',3,33,array(1,1,1), true) . '" alt="barcode"   />';

2D Barcodes

echo DNS2D::getBarcodeHTML('4445645656', 'QRCODE');
echo DNS2D::getBarcodePNGPath('4445645656', 'PDF417');
echo DNS2D::getBarcodeSVG('4445645656', 'DATAMATRIX');

1D Barcodes

echo DNS1D::getBarcodeHTML('4445645656', 'C39');
echo DNS1D::getBarcodeHTML('4445645656', 'C39+');
echo DNS1D::getBarcodeHTML('4445645656', 'C39E');
echo DNS1D::getBarcodeHTML('4445645656', 'C39E+');
echo DNS1D::getBarcodeHTML('4445645656', 'C93');
echo DNS1D::getBarcodeHTML('4445645656', 'S25');
echo DNS1D::getBarcodeHTML('4445645656', 'S25+');
echo DNS1D::getBarcodeHTML('4445645656', 'I25');
echo DNS1D::getBarcodeHTML('4445645656', 'I25+');
echo DNS1D::getBarcodeHTML('4445645656', 'C128');
echo DNS1D::getBarcodeHTML('4445645656', 'C128A');
echo DNS1D::getBarcodeHTML('4445645656', 'C128B');
echo DNS1D::getBarcodeHTML('4445645656', 'C128C');
echo DNS1D::getBarcodeHTML('44455656', 'EAN2');
echo DNS1D::getBarcodeHTML('4445656', 'EAN5');
echo DNS1D::getBarcodeHTML('4445', 'EAN8');
echo DNS1D::getBarcodeHTML('4445', 'EAN13');
echo DNS1D::getBarcodeHTML('4445645656', 'UPCA');
echo DNS1D::getBarcodeHTML('4445645656', 'UPCE');
echo DNS1D::getBarcodeHTML('4445645656', 'MSI');
echo DNS1D::getBarcodeHTML('4445645656', 'MSI+');
echo DNS1D::getBarcodeHTML('4445645656', 'POSTNET');
echo DNS1D::getBarcodeHTML('4445645656', 'PLANET');
echo DNS1D::getBarcodeHTML('4445645656', 'RMS4CC');
echo DNS1D::getBarcodeHTML('4445645656', 'KIX');
echo DNS1D::getBarcodeHTML('4445645656', 'IMB');
echo DNS1D::getBarcodeHTML('4445645656', 'CODABAR');
echo DNS1D::getBarcodeHTML('4445645656', 'CODE11');
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA');
echo DNS1D::getBarcodeHTML('4445645656', 'PHARMA2T');

Running without Laravel

You can use this library without using Laravel.

Example:

use \Milon\Barcode\DNS1D;

$d = new DNS1D();
$d->setStorPath(__DIR__.'/cache/');
echo $d->getBarcodeHTML('9780691147727', 'EAN13');

License

This package is published under GNU LGPLv3 license and copyright to Nuruzzaman Milon. Original Barcode generation classes were written by Nicola Asuni. The license agreement is on project's root.

Buy me a coffee ☕

License: GNU LGPLv3
Package Author: Nuruzzaman Milon
Original Barcode Class Author: Nicola Asuni
Package Copyright: Nuruzzaman Milon
Barcode Generation Class Copyright:
Nicola Asuni
Tecnick.com LTD
www.tecnick.com

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].