Skip to content

Commit

Permalink
add feature scale render QR code image (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
moayadalsariya authored Dec 11, 2021
1 parent faadf78 commit f4a4bd5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/GenerateQrCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use chillerlan\QRCode\QRCode;
use InvalidArgumentException;
use chillerlan\QRCode\QROptions;

class GenerateQrCode
{
Expand Down Expand Up @@ -68,8 +69,13 @@ public function toBase64(): string
*
* @return string
*/
public function render(): string
public function render($scale = 5): string
{
return (new QRCode)->render($this->toBase64());
$options = new QROptions(
[
'scale' => $scale,
]
);
return (new QRCode($options))->render($this->toBase64());
}
}

0 comments on commit f4a4bd5

Please sign in to comment.