Skip to content

gonzalo123/qrserviceprovider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qr code service provider for silex

Build Status

Requirements

Installation

Add in your composer.json

{
    "require": {
        "gonzalo123/qrserviceprovider": "dev-master"
    }
}

Example

use Silex\Application;
use G\QrServiceProvider;

$app = new Application();

$app->register(new QrServiceProvider(), [
    'qr.defaults' => [
        'padding'   => 5, // default: 0
        'size'      => 200,
        'imageType' => 'png', // png, gif, jpeg, wbmp (default: png)
    ]
]);

$app->get("/qr/base64/{text}", function($text) use ($app) {
    return $app['qrCode'](base64_decode($text))->getResponse();
});

$app->get("/qr/{text}", function($text) use ($app) {
    return $app['qrCode']($text)->getResponse();
});

$app->run();

About

QR code service provider for silex using endroid/qrcode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages