Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -328,16 +328,19 @@ class badges extends Controller
|
||||
public function badgePreview() : void
|
||||
{
|
||||
header('content-type: image/svg+xml');
|
||||
echo new CustomBadge(
|
||||
Request::i()->shape ?: 'circle',
|
||||
Request::i()->foreground ?: '#fff',
|
||||
Request::i()->background ?: '#eeb95f',
|
||||
Request::i()->border ?: '#f7d36f',
|
||||
Request::i()->icon ?: null,
|
||||
(int) Request::i()->rotation ?: 0,
|
||||
(int) Request::i()->sides ?: 5,
|
||||
(int) Request::i()->numberoverlay ?: 0
|
||||
);
|
||||
|
||||
$badge = new CustomBadge;
|
||||
$badge->shape = Request::i()->shape ?: 'circle';
|
||||
$badge->foreground = Request::i()->foreground ?: '#fff';
|
||||
$badge->background = Request::i()->background ?: '#eeb95f';
|
||||
$badge->border = Request::i()->border ?: '#f7d36f';
|
||||
$badge->icon = Request::i()->icon ? json_decode( Request::i()->icon, true ) : null;
|
||||
$badge->rotation = Request::i()->rotation ?: 0;
|
||||
$badge->sides = Request::i()->sides ?: 5;
|
||||
$badge->number_overlay = Request::i()->numberoverlay ?: 0;
|
||||
$badge->icon_size = Request::i()->iconsize ?: 3;
|
||||
$badge->generateSVG( true );
|
||||
echo $badge->raw;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user