You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload files with a single curl command from your terminal! `curl --upload-file file.txt https://keep.sh`
18
+
Upload files with a single curl command from your terminal! `curl --upload-file your-local-file.txt https://keep.sh`
17
19
18
20
## Introduction
19
21
Simple QrCode is an easy to use wrapper for the popular Laravel framework based on the great work provided by [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode). We created an interface that is familiar and easy to install for Laravel users.
@@ -22,6 +24,10 @@ Simple QrCode is an easy to use wrapper for the popular Laravel framework based
22
24
23
25
Documentation for Simple QrCode can be found on our [website.](https://www.simplesoftware.io/simple-qrcode)
Please submit all issues and pull requests to the [simplesoftwareio/simple-qrcode](https://github.com/simplesoftwareio/simple-qrcode) repository on the develop branch!
Copy file name to clipboardExpand all lines: docs/en/README.md
+84-45Lines changed: 84 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Simple QrCode
11
11
12
12
13
13
-[Introduction](#docs-introduction)
14
-
-[Translations](#docs-translations)
14
+
-[Upgrade Guide](#docs-upgrade)
15
15
-[Configuration](#docs-configuration)
16
16
-[Simple Ideas](#docs-ideas)
17
17
-[Usage](#docs-usage)
@@ -29,32 +29,23 @@ Upload files with a single curl command from your terminal! `curl --upload-file
29
29
## Introduction
30
30
Simple QrCode is an easy to use wrapper for the popular Laravel framework based on the great work provided by [Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode). We created an interface that is familiar and easy to install for Laravel users.
31
31
32
-
<aid="docs-translations"></a>
33
-
## Translations
34
-
We are looking for users who speak Arabic, Spanish, French, Korean or Japanese to help translate this document. Please create a pull request if you are able to make a translation!
First, add the Simple QrCode package to your `require` in your `composer.json` file:
34
+
<aid="docs-upgrade"></a>
35
+
## Upgrade Guide
42
36
43
-
"require": {
44
-
"simplesoftwareio/simple-qrcode": "~2"
45
-
}
37
+
Upgrade from v2 by changing your `composer.json` file to `~3`
46
38
47
-
Next, run the `composer update` command.
39
+
You **must** install the `imagick` PHP extension if you plan on using the `png` image format.
48
40
49
-
#### Service Provider
41
+
<aid="docs-configuration"></a>
42
+
## Configuration
50
43
51
-
###### Laravel <= 5.4
52
-
Register the `SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class` in your `config/app.php` within the `providers` array.
44
+
#### Composer
53
45
54
-
#### Aliases
46
+
Run `composer require simplesoftwareio/simple-qrcode "~3"` to add the package.
55
47
56
-
###### Laravel <= 5.4
57
-
Finally, register the `'QrCode' => SimpleSoftwareIO\QrCode\Facades\QrCode::class` in your `config/app.php` configuration file within the `aliases` array.
48
+
Laravel will automiatcally pick up and install the package.
58
49
59
50
<aid="docs-ideas"></a>
60
51
## Simple Ideas
@@ -86,14 +77,14 @@ Using the QrCode Generator is very easy. The most basic syntax is:
86
77
87
78
This will make a QrCode that says "Make me into a QrCode!"
>Heads up! This method must be called last if using within a chain.
96
-
97
88
`Generate` by default will return a SVG image string. You can print this directly into a modern browser within Laravel's Blade system with the following:
98
89
99
90
{!! QrCode::generate('Make me into a QrCode!'); !!}
@@ -102,37 +93,87 @@ The `generate` method has a second parameter that will accept a filename and pat
102
93
103
94
QrCode::generate('Make me into a QrCode!', '../public/qrcodes/qrcode.svg');
104
95
105
-
#### Format Change
106
-
107
-
>QrCode Generator is setup to return a SVG image by default.
108
-
109
-
>Watch out! The `format` method must be called before any other formatting options such as `size`, `color`, `backgroundColor`, and `margin`.
96
+
#### Format `(string $format)`
110
97
111
-
Three formats are currently supported; PNG, EPS, and SVG. To change the format use the following code:
98
+
Three formats are currently supported; `png,``eps,` and `svg.` To change the format use the following code:
112
99
113
-
QrCode::format('png'); //Will return a PNG image
114
-
QrCode::format('eps'); //Will return a EPS image
115
-
QrCode::format('svg'); //Will return a SVG image
100
+
QrCode::format('png'); //Will return a png image
101
+
QrCode::format('eps'); //Will return a eps image
102
+
QrCode::format('svg'); //Will return a svg image
116
103
117
-
#### Size Change
104
+
> `imagick` is required in order to generate a `png` image.
118
105
119
-
>QrCode Generator will by default return the smallest size possible in pixels to create the QrCode.
106
+
#### Size `(int $size)`
120
107
121
108
You can change the size of a QrCode by using the `size` method. Simply specify the size desired in pixels using the following syntax:
#### EyeColor `(int $eyeNumber, int $innerRed, int $innerGreen, int $innerBlue, int $outterRed = 0, int $outterGreen = 0, int $outterBlue = 0)`
149
+
150
+
You may change the eye colors by using the `eyeColor` method.
151
+
152
+
| Eye Number | Example |
153
+
| --- | --- |
154
+
|`0`||
155
+
|`1`||
156
+
|`2`||
157
+
158
+
159
+
#### Style `(string $style, float $size = 0.5)`
160
+
161
+
The style can be easily swapped out with `square.``dot,` or `round.` This will change the blocks within the QrCode. The second parameter will affect the size of the dots or roundness.
162
+
163
+
| Style | Example |
164
+
| --- | --- |
165
+
|`sqaure`||
166
+
|`dot`||
167
+
|`round`||
168
+
169
+
#### Eye Style `(string $style)`
170
+
171
+
The eye within the QrCode supports two different styles, `dot` and `circle.`
172
+
173
+
| Style | Example |
174
+
| --- | --- |
175
+
|`sqaure`||
176
+
|`circle`||
136
177
137
178
#### Margin Change
138
179
@@ -192,8 +233,6 @@ Change the character encoding that is used to build a QrCode. By default `ISO-8
192
233
| GBK |
193
234
| EUC-KR |
194
235
195
-
>An error of `Could not encode content to ISO-8859-1` means that the wrong character encoding type is being used. We recommend `UTF-8` if you are unsure.
196
-
197
236
#### Merge
198
237
199
238
The `merge` method merges an image over a QrCode. This is commonly used to placed logos within a QrCode.
@@ -232,7 +271,7 @@ The `mergeString` method can be used to achieve the same as the `merge` call, ex
232
271
233
272
#### Advance Usage
234
273
235
-
All methods support chaining. The `generate` method must be called last and any `format` change must be called first. For example you could run any of the following:
274
+
All methods support chaining. The `generate` method must be called last. For example you could run any of the following:
236
275
237
276
QrCode::size(250)->color(150,90,10)->backgroundColor(10,14,244)->generate('Make me a QrCode!');
238
277
QrCode::format('png')->size(399)->color(40,40,40)->generate('Make me a QrCode!');
@@ -364,9 +403,9 @@ You can use a prefix found in the table below inside the `generate` section to c
364
403
<aid="docs-outside-laravel"></a>
365
404
## Usage Outside of Laravel
366
405
367
-
You may use this package outside of Laravel by instantiating a new `BaconQrCodeGenerator` class.
406
+
You may use this package outside of Laravel by instantiating a new `Generator` class.
368
407
369
-
use SimpleSoftwareIO\QrCode\BaconQrCodeGenerator;
408
+
use SimpleSoftwareIO\QrCode\Generator;
370
409
371
-
$qrcode = new BaconQrCodeGenerator;
410
+
$qrcode = new Generator;
372
411
$qrcode->size(500)->generate('Make a qrcode without Laravel!');
0 commit comments