Download the PHP package eduplus/qr without Composer
On this page you can find all versions of the php package eduplus/qr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package qr
Short Description Laravel package for QR Code and Barcode generation using EduplusQR and EduplusBarcode with configurable binary paths.
License MIT
Informations about the package qr
Eduplus QR - Laravel Package
Laravel package for QR Code and Barcode generation using EduplusQR and EduplusBarcode with configurable binary paths. This approach allows you to use a single set of binaries across all your Laravel projects without bundling heavy binary files in each project.
Features
- Configurable Binary Paths: Set binary locations once, use across all projects
- Lightweight Package: No bundled binaries, reducing package size
- Fluent API: Clean, chainable method syntax
- Laravel Integration: Service provider and config publishing
- QR Code Generation: Full EduplusQR functionality
- Barcode Generation: Support for Code128, Code39, EAN-13
- Environment Configuration: Set paths via .env file
Installation
Install via Composer:
Publish the configuration file:
This will create config/eduplusqr.php in your Laravel project.
Binary Setup
1. Download Binaries
Download the appropriate binaries for your system from EduplusQR and EduplusBarcode packages, or place them in a shared location:
2. Configure Binary Paths
Option A: Via .env file (recommended):
Option B: Via config/eduplusqr.php:
Platform-Specific Binary Names
- Linux x86_64:
EduplusQR-linux-amd64,EduplusBarcode-linux-amd64 - Linux ARM64:
EduplusQR-linux-arm64,EduplusBarcode-linux-arm64 - macOS Intel:
EduplusQR-darwin-amd64,EduplusBarcode-darwin-amd64 - macOS Apple Silicon:
EduplusQR-darwin-arm64,EduplusBarcode-darwin-arm64 - Windows:
EduplusQR-windows-amd64.exe,EduplusBarcode-windows-amd64.exe
Usage
QR Code Generation
Basic Usage
JSON Data QR Code
Get Base64 Encoded QR Code
Controller Example
Barcode Generation
Basic Usage
Different Barcode Types
Get Base64 Encoded Barcode
API Reference
QrCode Methods
create()- Create new QrCode instancetext($text)- Set text or JSON data to encodeoutput($path)- Set output file pathsize($pixels)- Set QR code size (default: 256)errorCorrection($level)- Set error correction: L, M, Q, H (default: M)margin($pixels)- Set border margin (default: 0)generate()- Generate and save QR codegenerateAndReturn()- Generate and return binary datagenerateBase64()- Generate and return base64 stringquick($text, $output, $size = 256)- Quick generation
BarCode Methods
create()- Create new BarCode instancetext($text)- Set text to encodeoutput($path)- Set output file pathtype($type)- Set barcode type: code128, code39, ean13 (default: code128)width($pixels)- Set barcode width (default: 300)height($pixels)- Set barcode height (default: 100)generate()- Generate and save barcodegenerateAndReturn()- Generate and return binary datagenerateBase64()- Generate and return base64 stringquick($text, $output, $type = 'code128', $width = 300, $height = 100)- Quick generation
Error Handling
Both classes expose a public $errors array:
Benefits of This Approach
- Reduced Package Size: No bundled binaries in each project
- Single Binary Location: One set of binaries for all Laravel projects
- Easy Updates: Update binaries once, all projects benefit
- Flexible Deployment: Configure different paths per environment
- Server Optimization: Shared binaries reduce disk usage
Requirements
- PHP 7.4 or higher
- Laravel 8.x, 9.x, 10.x, or 11.x
- EduplusQR and EduplusBarcode binaries installed on the system
Author
Md Mojahedul Islam
- Email: [email protected]
- Website: https://md-mojahed.github.io
License
MIT License - see LICENSE file for details