I need some help to use this packet ( picqer / php-barcode-generator ) in my project Laravel 5 .
Installation :
composer require picqer/php-barcode-generator
Driver :
use src\BarcodeGeneratorJPG;
Driver :
public function index () {
$cod_bar2 = 'F14157709998995727802010004910F139001000F19620';
$generatorPNG = new Picqer\Barcode\BarcodeGeneratorJPG();
$code = chr(241).$cod_bar2;
$cod_bar2 = base64_encode( $generatorPNG->getBarcode($code, Picqer\Barcode\BarcodeGeneratorJPG::TYPE_CODE_128_A));
}
The error that laravel generates:
"Class 'App \ Http \ Controllers \ Picqer \ Barcode \ BarcodeGeneratorJPG' not found "
When I change:
$generatorPNG = new Picqer\Barcode\BarcodeGeneratorJPG();
For this:
$generatorPNG = new BarcodeGeneratorJPG();
I get this Error:
"Class 'src \ BarcodeGeneratorJPG' not found"
Something tells me that I should configure the file app.php
of the folder config
but I really do not know what I should do.