PHP code example of max13 / laravel-barcode

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

    

max13 / laravel-barcode example snippets


// To check an ean13 barcode:
if (Barcode::isValid('0123456789104')) {
    // This barcode is valid
}

// To calculate an ean13 barcode check digit (the last digit)
echo Barcode::checksum('012345678910'); // Show: '4'

// To fix an ean13 barcode if it's needed
echo Barcode::fix('0123456789100'); // Show: '0123456789104'
bash
php artisan vendor:publish --provider="Max13\Barcode\ServiceProvider" --tag=public
bash
php artisan vendor:publish --provider="Max13\Barcode\ServiceProvider" --tag=config