PHP code example of ageekdev / laravel-barcode

1. Go to this page and download the library: Download ageekdev/laravel-barcode 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/ */

    

ageekdev / laravel-barcode example snippets


use AgeekDev\Barcode\Facades\Barcode;
use AgeekDev\Barcode\Enums\Type;

$barcode = Barcode::imageType("svg")
                ->foregroundColor("#000000")
                ->height(30)
                ->widthFactor(2)
                ->type(Type::TYPE_CODE_128)
                ->generate("081231723897");
bash
php artisan vendor:publish --tag="laravel-barcode-config"