|
683 | 683 | try {
|
684 | 684 | $redirectURL = url('').'/'.'u/'.Auth::user()->id;
|
685 | 685 |
|
| 686 | + $argValues = config('advanced-config.qr_code_gradient') ?? [0, 0, 0, 0, 0, 0, 'diagonal']; |
| 687 | + list($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7) = $argValues; |
| 688 | +
|
686 | 689 | if (extension_loaded('imagick')) {
|
687 |
| - $imgSrc = QrCode::format('png')->gradient(224, 36, 252, 35, 199, 225,'diagonal')->eye('circle')->style('round')->size(1000)->generate($redirectURL); |
| 690 | + $imgSrc = QrCode::format('png')->gradient($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7)->eye('circle')->style('round')->size(1000)->generate($redirectURL); |
688 | 691 | $imgSrc = base64_encode($imgSrc);
|
689 | 692 | $imgSrc = 'data:image/png;base64,' . $imgSrc;
|
690 | 693 | $imgType = 'png';
|
691 | 694 | } else {
|
692 |
| - $imgSrc = QrCode::gradient(224, 36, 252, 35, 199, 225,'diagonal')->eye('circle')->style('round')->size(1000)->generate($redirectURL); |
| 695 | + $imgSrc = QrCode::gradient($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7)->eye('circle')->style('round')->size(1000)->generate($redirectURL); |
693 | 696 | $imgSrc = base64_encode($imgSrc);
|
694 | 697 | $imgSrc = 'data:image/svg+xml;base64,' . $imgSrc;
|
695 | 698 | $imgType = 'svg';
|
|
0 commit comments