How to Generate QR Code in Laravel 7/6?

About Us:

We are from free coder. We are a group of web developers who are passionate about web development. You can learn from us php, laravel, node js, vue js, react js and many other topic on web developement.
we are very happy to help you.
free coder

Today what you are going to learn:

If you need to see lesson of laravel 7/6 qr code generator. This post will give you simple lesson of laravel 7/6 qr code lesson. we will help you to give lesson of how to create qr code in laravel 7/6 i explained simply step by step how to make qr code in laravel 7/6 So, let's follow few step to create lesson of how to generate qr code in laravel 7/6.

simple-qrcode is a composer package for generate qr code in your laravel 6 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.

Hello Brother, i write lesson step by step to generate qr code in your laravel 5 admin panel. so let's follow few steps to get this lesson:

Lesson 1: Install Laravel 6

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

composer create-project --prefer-dist laravel/laravel blog

Lesson 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.

composer require simplesoftwareio/simple-qrcode

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


'providers' => [




'aliases' => [


'QrCode' => SimpleSoftwareIO\QrCode\Facades\QrCode::class


Lesson 3: Create Route

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



Route::get('qr-code-g', function () {



->generate('', public_path('images/qrcode.png'));

return view('qrCode');


Lesson 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:


<!DOCTYPE html>



<title>How to Generate QR Code in Laravel 6? -</title>



<div class="visible-print text-center">

<h1>Laravel 6 - QR Code Generator Example</h1>

{!! QrCode::size(250)->generate(''); !!}

<p>lesson by</p>




Now you can run and check it.

thank you very much for following up with me.

Recent Posts

Related Posts