Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Feb 28, 2021
1 parent 6fa27c4 commit 0400ece
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,18 @@ $result = Builder::create()

```php

// Set additional writer options (SvgWriter example)
$qrCode->

// Directly output the QR code
header('Content-Type: '.$qrCode->getContentType());
echo $qrCode->writeString();
header('Content-Type: '.$result->getMimeType());
echo $result->getString();

// Save it to a file
$qrCode->writeFile(__DIR__.'/qrcode.png');
$result->saveToFile(__DIR__.'/qrcode.png');

// Generate a data URI to include image data inline (i.e. inside an <img> tag)
$dataUri = $qrCode->writeDataUri();
$dataUri = $result->getDataUri();
```

![QR Code](https://endroid.nl/qr-code/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png)
![QR Code](https://endroid.nl/qr-code/default/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes)

### Writer options

Expand Down

0 comments on commit 0400ece

Please sign in to comment.