PHP code example of giauphan / laravel-qr-code
1. Go to this page and download the library: Download giauphan/laravel-qr-code 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/ */
giauphan / laravel-qr-code example snippets
'providers' => [
LaravelQRCode\Providers\QRCodeServiceProvider::class,
],
'aliases' => [
'QRCode' => LaravelQRCode\Facades\QRCode::class,
]
Route::get('qr-code', function () {
$path = public_path().'/qr-code.png';
$filename = '/qr-code.png';
QRCode::text('QR Code Generator for Laravel!')
->setOutfile($path )
->png();
return '<img src=' . $filename . '>';
});