DEV Community

Cover image for How to Generate QR Code in Laravel 11
Saddam Hossain
Saddam Hossain

Posted on

How to Generate QR Code in Laravel 11

In this post, I will show you How to Generate QR Code in Laravel 11 application. We will generate and save the QR code for a link.

We will use the simplesoftwareio/simple-qrcode composer package to generate QR codes in Laravel 11. simplesoftwareio/simple-qrcode provides methods to generate QR codes, save QR codes, generate QR codes for link, generate QR codes for phone numbers, generate QR codes for emails, and generate QR codes with downloads. So, we will see one-by-one example code. You Can Learn How to Generate Barcode in Laravel 11?

Let’s see the below steps How to Generate QR Code in Laravel 11?

Install Laravel 11
This step is not required; however, if you have not created the Laravel app, then you may go ahead and execute the below command:

composer create-project laravel/laravel Generate-QR-Code
cd Generate-QR-Code
Enter fullscreen mode Exit fullscreen mode

Install simplesoftwareio/simple-qrcode

In the first step, we will install the simplesoftwareio/simple-qrcode Package that provides the capability to generate QR codes in a Laravel application. So, first open your terminal and run the below command:

composer require simplesoftwareio/simple-qrcode
Enter fullscreen mode Exit fullscreen mode

Read More

Top comments (0)