Skip to content

Commit 1c98d9f

Browse files
committed
upgrade code demo
1 parent 7a42509 commit 1c98d9f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@
5050
```php
5151
<?php
5252

53-
Route::get('qr-code', function ()
54-
{
55-
return QRCode::text('QR Code Generator for Laravel!')->png();
53+
Route::get('qr-code', function () {
54+
$path = public_path().'/qr-code.png';
55+
$filename = '/qr-code.png';
56+
QRCode::text('QR Code Generator for Laravel!')
57+
->setOutfile($path )
58+
->png();
59+
return '<img src=' . $filename . '>';
5660
});
5761

5862
```

0 commit comments

Comments
 (0)