{"id":182,"date":"2020-08-22T10:30:12","date_gmt":"2020-08-22T03:30:12","guid":{"rendered":"https:\/\/www.panda-solution.net\/?p=182"},"modified":"2025-08-31T07:31:23","modified_gmt":"2025-08-31T00:31:23","slug":"laravel-5-7-qr-code-generator-example","status":"publish","type":"post","link":"https:\/\/www.pandasolutions.asia\/kh\/laravel-5-7-qr-code-generator-example\/","title":{"rendered":"Laravel 5.7 \u2013 QR Code Generator Example"},"content":{"rendered":"<p>In this post we will give you information about Laravel 5.7 \u2013 QR Code Generator Example. Hear we will give you detail about Laravel 5.7 \u2013 QR Code Generator ExampleAnd how to use it also give you demo for it if it is necessary.<\/p>\n<div><center><\/center>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.<\/p>\n<p>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.<\/p>\n<p>Here, i write example step by step to generate qr code in your laravel 5 admin panel. so let\u2019s follow few steps to get this example:<\/p>\n<p><strong>Step 1: Install Laravel 5.7<\/strong><\/p>\n<p>In first step, If you haven\u2019t installed laravel 5.7 in your system then you can run bellow command and get fresh Laravel project.<\/p>\n<pre>composer create-project --prefer-dist laravel\/laravel blog\r\n<\/pre>\n<p><strong>Step 2: Install simple-qrcode Package<\/strong><\/p>\n<p>Now we require to install simple-qrcode package for qr code generator, that way we can use it\u2019s method. So Open your terminal and run bellow command.<\/p>\n<pre>composer require simplesoftwareio\/simple-qrcode \"^2.0\"<\/pre>\n<p>Now open config\/app.php file and add service provider and aliase.<\/p>\n<p><strong>config\/app.php<\/strong><\/p>\n<div>\n<pre>'providers' =&gt; [\r\n\r\n....\r\n\r\nSimpleQrCodeQrCodeServiceProvider::class\r\n\r\n],\r\n\r\n'aliases' =&gt; [\r\n\r\n....\r\n\r\n'QrCode' =&gt; SimpleQrCodeQrCodeServiceProvider::class\r\n\r\n],\r\n<\/pre>\n<div>Also see:Laravel 5.7 Ajax Pagination Example<\/div>\n<p><strong>Step 3: Create Route<\/strong><\/p>\n<p>In this step, we will create one route for testing example. So, let\u2019s add new route on that file.<\/p>\n<p><strong>routes\/web.php<\/strong><\/p>\n<pre>&lt;?php\r\n\r\nRoute::get('qr-code-g', function () {\r\n\r\nQrCode::size(500)\r\n\r\n-&gt;format('png')\r\n\r\n-&gt;generate('pandasolutions.asia', public_path('images\/qrcode.png'));\r\n\r\nreturn view('qrCode');\r\n\r\n});\r\n<\/pre>\n<p><strong>Step 4: Create Blade file<\/strong><\/p>\n<p>now we need to create qrCode.blade.php for display qr code. so let\u2019s create blade file as like bellow code:<\/p>\n<p><strong>resources\/views\/qrCode.blade.php<\/strong><\/p>\n<div>Also see:PHP Laravel 5.7 \u2013 Create Admin Panel Example<\/div>\n<pre>&lt;!DOCTYPE html&gt;\r\n\r\n&lt;html&gt;\r\n\r\n&lt;head&gt;\r\n\r\n&lt;title&gt;&lt;\/title&gt;\r\n\r\n&lt;\/head&gt;\r\n\r\n&lt;body&gt;\r\n\r\n&lt;div &gt;\r\n\r\n&lt;h1&gt;Laravel 5.7 - QR Code Generator Example&lt;\/h1&gt;\r\n\r\n{!! QrCode::size(250)-&gt;generate('pandasolutions.asia'); !!}\r\n\r\n&lt;p&gt;example by pandasolutions.asia.&lt;\/p&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;\/body&gt;\r\n\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Now you can run and check it.<\/p>\n<p>I hope it can help you\u2026<\/p>\n<\/div>\n<p>Hope this code and post will helped you for implement\u00a0<b>Laravel 5.7 \u2013 QR Code Generator Example<\/b>. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this post we will give you information about Laravel 5.7 \u2013 QR Code Generator Example. Hear we will give you detail about Laravel 5.7 \u2013 QR Code Generator ExampleAnd how to use it also give you demo for it if it is necessary. In this tutorial, i would like to share with you how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":192,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":""},"categories":[13],"tags":[14],"_links":{"self":[{"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/posts\/182"}],"collection":[{"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":12,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":269,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/posts\/182\/revisions\/269"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/media\/192"}],"wp:attachment":[{"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pandasolutions.asia\/kh\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}