Replies: 3 comments 10 replies
-
Hi, you may want to check out this example: #150 (comment) |
Beta Was this translation helpful? Give feedback.
4 replies
-
Many people use this library with Laravel and i haven't heard yet that it isn't working. Still, i don't see any of your code and what you're trying to do and how. I cannot help you this way. |
Beta Was this translation helpful? Give feedback.
2 replies
-
<?php
namespace App\Http\Controllers\admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Route;
use chillerlan\QRCode\{QRCode, QROptions};
use chillerlan\QRCode\Output\{QROutputInterface, QRMarkupSVG};
use chillerlan\QRCode\Common\EccLevel;
use chillerlan\QRCode\RoundedCornerSVGQRCodeOutput;
class Test extends Controller
{
/*
* Test Action
*/
public function Testcallback(Request $req)
{
$action = $req->action;
if($action == 'img'){
return $this->imgTest();
}
}
public function imgTest()
{
$url = 'https://github.com/chillerlan/php-qrcode/issues/127';
$options = new RoundedCornerSVGQRCodeOutput([
// SVG logo options (see extended class below)
'svgLogo' => public_path('assets/temp/twitter.svg'), // logo from: https://github.com/simple-icons/simple-icons
'svgLogoScale' => 0.25,
'svgLogoCssClass' => 'dark',
// QROptions
'version' => 5,
'quietzoneSize' => 4,
'outputType' => QROutputInterface::CUSTOM,
'outputInterface' => QRSvgWithLogoAndCustomShapes::class,
'imageBase64' => false,
// ECC level H is necessary when using logos
'eccLevel' => EccLevel::H,
'addQuietzone' => true,
'svgDefs' => '
<linearGradient id="gradient" x1="100%" y2="100%">
<stop stop-color="#D70071" offset="0"/>
<stop stop-color="#9C4E97" offset="0.5"/>
<stop stop-color="#0035A9" offset="1"/>
</linearGradient>
<style><![CDATA[
.dark{fill: url(#gradient);}
.light{fill: #eaeaea;}
]]></style>',
]);
header('content-type: image/svg+xml');
return (new QRCode($options))->render($url);
}
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I try a lot to make QrCode eye in rounded but i failed, if any help from anyone my big problem will be solved. Its very urgent for me to do this task.
Here i found code, but its doing only circle inner Eye. I try very hard but i failed 😞😞😞😞
Please guide me, I want Rounded Corner Like this, Any Help Very much appreciated. Thank You
Beta Was this translation helpful? Give feedback.
All reactions