PHP code example of dscmall / barcodegen

1. Go to this page and download the library: Download dscmall/barcodegen library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dscmall / barcodegen example snippets


$this->barcode
    ->init($text, $size, $orientation, $codeType, $scale)
    ->generate()

$this->barcode
    ->generate($text, $size, $orientation, $codeType, $scale)

Route::get('barcode/img/{text}/{size?}/{scale?}/{codeType?}/{orientation?}', 'BarcodeController@barcodeAsPng');
Route::get('barcode/url/{text}/{size?}/{scale?}/{codeType?}/{orientation?}', 'BarcodeController@barcodeAsDataUrl');