Laravel QR code generator

I am using a laravel library called `simple-qr-code` in my previous project. It is pretty easy to use and configurable and I would like to share with you today.

Firstly download the package via composer

composer require simplesoftwareio/simple-qrcode "~4"

That is all for the configuration. And you can now generate in controller like this.

use SimpleSoftwareIO\QrCode\Facades\QrCode;

QrCode::generate('Make me into a QrCode!');

This will make a QrCode that says “Make me into a QrCode!”

Example QrCode

If you want to generate directly on the view, it is fine too.

{!! QrCode::size(300)->generate('generate Qr code'); !!}

If we want to generate a URL after reading the Qr code, we just have to pass a url string in generate function like this.

{!! QrCode::size(300)->generate('www.google.com'); !!}

You can vary the Qr code designs as well. You can see more detail here. Make sure to use when you have to deal with qr code as it is pretty easy to use.

By Yuuma



アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム