tigerranger/barcodepos

Barcode Generator and POS machine Integration for Laravel 6.*.*

dev-master 2020-03-05 06:42 UTC

This package is auto-updated.

Last update: 2025-07-13 14:36:32 UTC


README

Laravel 6.x | 7.x PHP 7.x License

This package is created to handle Barcode Iamge and POS Machine Integration.

Requirements

Documentations

Quick Installation

$ composer require tigerranger/barcodepos

Service Provider & Facade (Optional on Laravel 6.x)

Register provider and facade on your config/app.php file.

'providers' => [
    ...,
    tigerranger\Barcode\Barcode::class,
	tigerranger\Barcode\POS::class
]

'aliases' => [
    ...,
    'Barcode' => tigerranger\Barcode\Barcode::class,
	'POS'=>tigerranger\Barcode\POS::class
]

And that's it! Start building out some awesome Barcode and POS Software!

Use in Controller

        $barcode = new \tigerranger\Barcode\Barcode;
        $pos = new \tigerranger\Barcode\POS;
        $image= 'abbas.jpg'; // Name of the image
        $code= '0001CLSK729237';
        $barcode->set_barcode($code)  // Barcode Data max 15
                ->set_basepath(base_path()) // base path
                ->set_image_path("/public/barcode/$image"); // image name with path
        return view('amp.test')->with(compact('barcode','code','pos'));

Use in Blade Template

<img src="{{ asset('').$barcode->getBarcodeImage() }}" width="200" height="auto" />
<p>{{$code}}</p>

{!! $pos->setPOS(asset('')) !!}

<script>
    var pos= new POS({"fire":kmyfn}); // fire is function which call when POS machine read data
	pos.get_barcode() /* Change data when POS machine read data ---------
     -----------------   only for vue js , angular js , react js etc similar FM */
    function kmyfn(barcode){
        alert(barcode);   // write your own function and enjoy
    }
</script>

Security

If you discover any security related issues, please email omerabba009@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.