PHP code example of gigablah / silex-qrcode

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

    

gigablah / silex-qrcode example snippets


$app->register(new Gigablah\Silex\QrCode\QrCodeServiceProvider(), array(
    'qrcode.options' => array(
        'size' => 300,
        'padding' => 10
    )
));

$app['qrcode']->setText('http://example.org');

return new Symfony\Component\HttpFoundation\Response(
    $app['qrcode']->get('png'),
    200,
    array('Content-Type' => 'image/png')
);