think.studio/laravel-thinkqr
最新稳定版本:1.1.0
Composer 安装命令:
composer require think.studio/laravel-thinkqr
包简介
Wrapper for qrcode functionality.
README 文档
README
Wrapper for qrcode functionality.
Installation
Install the package via composer:
composer require think.studio/laravel-thinkqr
Optionally you can publish the config file with:
php artisan vendor:publish --provider="ThinkQR\ServiceProvider" --tag="config"
Usage
$qrCode = \ThinkQR\QRCode::make('foo'); // or $qrCode = \ThinkQR\QRCode::make('foo', [ 'render_size' => 300, 'margin' => 10, ]); $qrCode->getSvgString(); // XML svg string $qrCode->getPngString(); // Binary png string (you can encode to base64 and use as data image) // Save Files $qrCode->writeSvgFile('my/path/file.svg'); $qrCode->writePngFile('my/path/file.png');
Create tmp image for insert to some dynamic script like pdf.
use ThinkQR\Image\QrCodeImageForPdf; $pdf = new Fpdi(); $pdf->Image(QrCodeImageForPdf::make('https://example.com/foo-bar-baz', [ 'render_size' => 200, 'margin' => 2, ])->filePath(), 0, 0, 30);
Credits
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-04