This sample demonstrates how to decode barcodes and QR codes on the server side using the PHP Laravel framework.
-
- Windows Run Composer-Setup.exe
- Linux
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" sudo mv composer.phar /usr/local/bin/composer
-
-
Windows
-
Linux
sudo apt install php7.4
-
-
Laravel:
composer global require laravel/installer
Check the version number in the terminal:
php -v
PHP 7.4.30 (cli) (built: Jun 7 2022 16:24:55) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
php artisan --version
Laravel Framework 8.83.23
-
Build and install the PHP barcode Qr code extension.
-
Apply for a 30-day FREE trial license, and substitute the license key in
app/Http/Controllers/ImageUploadController.php
.DBRInitLicense("LICENSE-KEY");
-
Run the web application:
composer update composer install php artisan serve
-
Visit
http://127.0.0.1:8000/barcode_qr_reader
in a web browser.
How to Read Barcode QR Code on the Server Side Using PHP Laravel