PHP code example of silentlun / yii2-qrcode

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

    

silentlun / yii2-qrcode example snippets


namespace app\controllers;

use yii\web\Controller;
use silentlun\qrcode\QrCode;

class SiteController extends Controller
{
    public function actionQrcode($code_url)
    {
        return QRcode::png($code_url);
    }
}

php composer.phar 

 
use yii\helpers\Url;