HamasakiBrain / qrcode-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QRCode Monky API

The Free QR Code Generator for High Quality QR Codes

QRCode Monkey is one of the most popular free online qr code generators with millions of already created QR codes. The high resolution of the QR codes and the powerful design options make it one of the best free QR code generators on the web that can be used for commercial and print purposes.

Features

  • Endless lifetime with unlimited scans
  • High resolution QR Codes for Print
  • QR Codes with Logo
  • QR Code Vector Formats
  • Custom Design and Colors
  • Free for commercial usage

Installation

  1. You can install the package via composer:
composer require HamasakiBrain/laravel-qrcodemonkey
  1. Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:
'providers' => [
    // ...
    HamasakiBrain\QRCodeMonkey\QRCodeMonkeyServiceProvider::class,
];
  1. You should publish the config/qrcode_monkey.php config file with:
php artisan vendor:publish --provider="HamasakiBrain\QRCodeMonkey\QRCodeMonkeyServiceProvider"

Documentation

Custome Generate QRCode

use HamasakiBrain\QRCodeMonkey\QRCode\CustomeGenerate;

$generate = new CustomeGenerate();
$qrcode = $generate->setType("email") // QRCode Type Generate
    ->setData([
        "email"=>"aymanalaiwah.dev@gmail.com",
        "subject"=>"QRCode Monkey Api",
        "body"=>"Test Send Mail"
    ])
    ->setFileType("svg")
    ->getQRCode();
echo $qrcode;

Functions CustomeGenerate Class

  1. Set Qrcode Type (Optional) default value (text)
$generate = new CustomeGenerate();
/**
* @param string $type [ phone,sms, email, text, url, location,  wifi, bitcoin, event]
*/
$qrcode->setType($type);
  1. Set Platform (Optional) default value (web)
$generate = new CustomeGenerate();
/**
* @param string $platform [android,ios,web]
*/
$qrcode->setPlatform($platform);
  1. Set File type (Optional) default value (png)
$generate = new CustomeGenerate();
/**
* @param string $fileType [svg,png,eps,pdf]
*/
$qrcode->setFileType($fileType);
  1. Set Qrcode Size (Optional) default value (300x300)
$generate = new CustomeGenerate();
/**
* @param string $size
*/
$qrcode->setSize($size);
  1. Set Qrcode Background Color (Optional) default value (#ffffff)
$generate = new CustomeGenerate();
/**
* @param string $hexColor
*/
$qrcode->setBgColor($hexColor);
  1. Set Qrcode Body Color (Optional) default value (#000000)
$generate = new CustomeGenerate();
/**
* @param string $hexColor
*/
$qrcode->setBodyColor($hexColor);
  1. Set Qrcode Eye Color (Optional) default value (#000000)
$generate = new CustomeGenerate();
/**
* @param string $eye1Color default value (#000000)
* @param string $eye2Color default value (#000000)
* @param string $eye3Color default value (#000000)
*/
$qrcode->setEyeColors($eye1Color, $eye2Color, $eye3Color)
  1. Set Qrcode Eye Ball Color (Optional) default value (#000000)
$generate = new CustomeGenerate();
/**
* @param string $eyeBall1Color default value (#000000)
* @param string $eyeBall2Color default value (#000000)
* @param string $eyeBall3Color default value (#000000)
*/
$qrcode->setEyeBallColors($eyeBall1Color, $eyeBall2Color, $eyeBall3Color)
  1. Set Qrcode Gradient Color (Optional) default value (null)
$generate = new CustomeGenerate();
/**
* @param string $gradientColor1 default value (null)
* @param string $gradientColor2 default value (null)
*/
$qrcode->setGradientColors($gradientColor1, $gradientColor2)
  1. Set Qrcode Gradient type (Optional) default value (linear)
$generate = new CustomeGenerate();
/**
* @param string $type [linear, radial]
*/
$qrcode->setGradientType($type)
  1. Set Qrcode logo mode (Optional) default value (default)
$generate = new CustomeGenerate();
/**
* @param string $mode [default, clean]
*/
$qrcode->setLogoMode($mode)
  1. Set Qrcode logo (Optional) default value (null)
$generate = new CustomeGenerate();
/**
* @param string $logo url logo
*/
$qrcode->setLogo($logo)
  1. Gradient On Eyes default false
$generate = new CustomeGenerate();
$qrcode->gradientOnEyes()
  1. Generate QrCode and return image data
$generate = new CustomeGenerate();
$qrcode->getQRCode()
  1. Generate QrCode and return download image url
$generate = new CustomeGenerate();
$qrcode->donwload()
  1. Set Qrcode Body shape (optional) default value (square)
$generate = new CustomeGenerate();

/**
* @param string $shape
*/
$qrcode->setBodyShape($shape);

// Get Body Shape Supported
use HamasakiBrain\QRCodeMonkey\Support\Shapes;
$bodyShape = Shapes::bodyShape(); // Get Body Shape supported keys
$bodyShapeImgs = Shapes::getBodyShapeImg(); // Get Body Shape supported keys with image url
  1. Set Qrcode Eye shape (optional) default value (frame0)
$generate = new CustomeGenerate();

/**
* @param string $shape
*/
$qrcode->setEyeShape($shape);

// Get Eye Shape Supported
use HamasakiBrain\QRCodeMonkey\Support\Shapes;
$eyeFrameShape = Shapes::eyeFrameShape(); // Get Eye Shape supported keys
$eyeFrameShapeImgs = Shapes::getEyeFrameShapeImg(); // Get Eye Shape supported keys with image url
  1. Set Qrcode Eye Ball shape (optional) default value (ball0)
$generate = new CustomeGenerate();

/**
* @param string $shape
*/
$qrcode->setEyeBallShape($shape);

// Get Eye Ball Shape Supported
use HamasakiBrain\QRCodeMonkey\Support\Shapes;
$eyeBallShape = Shapes::eyeBallShape(); // Get Eye Ball Shape supported keys
$eyeBallShapeImg = Shapes::getEyeBallShapeImg(); // Get Eye Ball Shape supported keys with image url

Contributing

Please submit all issues and pull requests to the HamasakiBrain/laravel-qrcodemonkey repository on the develop branch!

License

This software is released under the MIT license.

About


Languages

Language:PHP 100.0%