PHP code example of linkxtr / laravel-qrcode

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

    

linkxtr / laravel-qrcode example snippets


use Linkxtr\QrCode\Facades\QrCode;

$qr = QrCode::size(400)
    ->format('png')
    ->color(30, 64, 175)
    ->errorCorrection('H')
    ->merge(public_path('logo.png'), 0.25)
    ->generate('https://example.com');

QrCode::WiFi([
    'ssid' => 'OfficeNetwork',
    'encryption' => 'WPA2',
    'password' => 'secret'
]);

QrCode::Email('[email protected]', 'Say Hi!');
QrCode::BTC('bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', 0.005);