Coder Social home page Coder Social logo

qr's Introduction

QR Code Generator Bundle for Laravel

This bundle will allow you to easily generate QR code images. The draw function echos out an html image tag; however, this bundle can easily be manipulated to fit your app needs.

Installation

To install the bundle, run the following command

php artisan bundle:install qr

Next, we will tell the application to auto load the bundle. In your application/bundles.php file add the following line to the array

'qr' => array('auto' => true),

Or, if we set 'auto' to false, we could manually start the bundle wherever we needed to use it by adding the following line:

Bundle::start('qr');

Example usage

If we were to add the following route to our application:

Route::get('generate', function(){

	$qr = new QR();
	$qr->url("www.laravel.com");
	$qr->draw();

});

Now, by going to our APP_NAME/bundle/ URL you will see a new QR Code generated on the screen. Simply use a QR code scanner and you will see that the QR code redirects to our specified URL

OPTIONS

You can use all the following options to generate a QR code that fits your needs:

// bookmark 
$qr->boomark("title", "url"); 

// contact 
$qr->contact("name", "address", "phone", "email"); 

// content 
$qr->content("type", "size", "content"); 

// email 
$qr->email("email", "subject", "message"); 

// geo location 
$qr->geo("lat", "lon", "height"); 

// phone 
$qr->phone("phone"); 

// sms 
$qr->sms("phone", "text"); 

// text 
$qr->text("text"); 

// URL 
$qr->url("url"); 

// wifi connection 
$qr->wifi("type", "ssid", "password");

Credits

This file has been updated and manipulated to work with the new Google API and put into a Laravel Bundle. The original outdated version was created by a (shayanderson)[http://www.shayanderson.com/php/php-qr-code-generator-class.htm]

qr's People

Contributors

tnylea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qr's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.