https://github.com/accessd/qrcode-library
https://github.com/accessd/qrcode-library
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/accessd/qrcode-library
- Owner: accessd
- License: other
- Created: 2019-11-06T16:38:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-06T16:39:50.000Z (over 5 years ago)
- Last Synced: 2025-01-21T00:05:03.105Z (3 months ago)
- Language: PHP
- Size: 131 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
QrCode Helper for Yii2
======================[](https://github.com/2amigos/yii2-qrcode-helper/tags)
[](LICENSE.md)
[](https://travis-ci.org/2amigos/yii2-qrcode-helper)
[](https://scrutinizer-ci.com/g/2amigos/yii2-qrcode-helper/code-structure)
[](https://scrutinizer-ci.com/g/2amigos/yii2-qrcode-helper)
[](https://packagist.org/packages/2amigos/yii2-qrcode-helper)QrCode helper allows you to render QrCodes on your Yii2 applications.
Installation
------------
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).Either run
```
php composer.phar require 2amigos/yii2-qrcode-helper:~1.0
```
or add```json
"2amigos/yii2-qrcode-helper" : "~1.0"
```to the require section of your application's `composer.json` file.
Usage
-----The helper comes with some format helper classes that will help you to create the different type of QrCodes that a
mobile phone scanner will understand.The library comes with the following formats:
- Bitcoin
- BookMark
- Geo
- iCal
- MailMessage
- MailTo
- MeCard
- MMS
- Phone
- Sms
- vCard
- Wifi
- YoutubeThere are many more out there, we hope the community will helps us improve the library with `facebook`, `google maps`,
`youtube`, and `market` links. If not, we will add them whenever we have time :)To render the qrcode, add this to your HTML page:
```html
![]()
```Now, use it on your action:
```php
use dosamigos\qrcode\formats\MailTo;
use dosamigos\qrcode\QrCode;\\ ...
public function actionQrcode() {
$mailTo = new MailTo(['email' => '[email protected]']);
return QrCode::png($mailTo->getText());
// you could also use the following
// return return QrCode::png($mailTo);
}```
That's it, you should have a beautiful QrCode image on your website.
## Testing
``` bash
$ phpunit
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Antonio Ramirez](https://github.com/tonydspaniard)
- [All Contributors](../../contributors)## License
The BSD License (BSD). Please see [License File](LICENSE.md) for more information.
> [](http://www.2amigos.us)
Web development has never been so fun!
[www.2amigos.us](http://www.2amigos.us)