tanvirismail/barcode 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tanvirismail/barcode

最新稳定版本:v1.0.0

Composer 安装命令:

composer require tanvirismail/barcode

包简介

laravel Barcode package

README 文档

README

supported barcode format: CODE39, CODE128

barcode

use TanvirIsmail\Barcode\Barcode;

$barcode = new Barcode;
$barcode->code('200300001');
$barcode->type('code39');  // code39, code128
$barcode->height(100);
$barcode->barWidth(2);
$barcode->margin(10);
$barcode->background([255, 255, 255]); // transparent = [0, 0, 0, 127]
$barcode->barColor([[0, 0, 0],[255, 255, 255]]);
$barcode->showcode();
$barcode->label('barcode');
$barcode->labelPosition('right'); // center , left, right

response as image

$barcode->responseHeader();
echo $barcode->build();
// for laravel
response($barcode->build())->header('Content-Type', $barcode->getContentType());

view as image

echo '<img src="data:image/png;base64,' . base64_encode($barcode->build()) . '">';

save

$barcode->extension('png');  // jpeg, png
$barcode->path('barcode.png');  // path with file name
$barcode->save();

download

$barcode->download(); 
// if download as file name
$barcode->extension('png'); // default 'png'
$barcode->download('test'); // file name without extention

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固