Laravel 5.7 – QR Code Generator Example

In this tutorial, i would like to share with you how to generate qr code using simple-qrcode in laravel 5.7. you can simply create qr codes with specific url, text, size, color, backgroundColor, margin, format like png, eps, svg.

simple-qrcode is a composer package for generate qr code in your laravel 5.7 application. simple-qrcode provide to send sms and email with generated qr code. you can create qr code for geo, phoneNumber, birthdate using simple qrcode package.

after generating qr code, we might be require to write code for scan code using jquery. if you same requirement for scan qr code using jquery then you can follow my this tutorial: qr code scanner using instascan js.

Here, i write example step by step to generate qr code in your laravel 5 admin panel. so let’s follow few steps to get this example:

Step 1: Install Laravel 5.7

In first step, If you haven’t installed laravel 5.7 in your system then you can run bellow command and get fresh Laravel project.

 

Step 2: Install simple-qrcode Package

Now we require to install simple-qrcode package for qr code generator, that way we can use it’s method. So Open your terminal and run bellow command.

 

Now open config/app.php file and add service provider and aliase.

config/app.php

 

Step 3: Create Route

In this step, we will create one route for testing example. So, let’s add new route on that file.

routes/web.php

 

Step 4: Create Blade file

now we need to create qrCode.blade.php for display qr code. so let’s create blade file as like bellow code:

resources/views/qrCode.blade.php

 

Now you can run and check it.

I hope it can help you…

 

 

 

 

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Gửi email cho tôi

Hotline
0396.504.701
GÓP Ý
CỦA BẠN
Hotline
0396.504.701
ĐĂNG KÝ
NHẬN THÔNG TIN