定制 ageekdev/laravel-barcode 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ageekdev/laravel-barcode

最新稳定版本:v1.3.0

Composer 安装命令:

composer require ageekdev/laravel-barcode

包简介

laravel barcode generator

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads Laravel 9.x Laravel 10.x Laravel 11.x Laravel 12.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.

统计信息

  • 总下载量: 13.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-02