Skip to content

Commit 11563ab

Browse files
committed
Docs: update README
1 parent 3293dc1 commit 11563ab

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

README.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,40 @@ composer require devtical/nova-qrcode-field
1818
use Devtical\Qrcode\Qrcode;
1919
```
2020

21-
#### Basic
21+
#### Basic QR Code
22+
23+
To create a basic QR code with default settings:
2224

2325
```php
2426
Qrcode::make('QR Code', 'field')
2527
```
2628

27-
#### Setting sizes
29+
#### Setting QR Code Sizes
30+
31+
Specify the sizes for index and detail views:
2832

2933
```php
3034
Qrcode::make('QR Code', 'field')
31-
->indexSize(100)
32-
->detailSize(500)
35+
->indexSize(100) // QR size for index view
36+
->detailSize(500) // QR size for detail view
3337
```
3438

3539
![Size](art/1-size.png)
3640

37-
#### With logo
41+
### Margin Customization
42+
43+
Control the padding around the QR code for optimal appearance:
44+
45+
```php
46+
Qrcode::make('QR Code', 'field')
47+
->margin(10)
48+
```
49+
50+
The margin value for the QR code adjusts based on its size: if the size is greater than `250`, it uses the margin value specified in `->margin()`, otherwise it defaults to a margin value of `1`.
51+
52+
### Adding a Logo
53+
54+
Add a logo to the center of the QR code:
3855

3956
```php
4057
Qrcode::make('QR Code', 'field')
@@ -43,7 +60,9 @@ Qrcode::make('QR Code', 'field')
4360

4461
![Logo](art/2-logo.png)
4562

46-
#### With background
63+
### Setting a Background Image
64+
65+
Set a background image for the QR code:
4766

4867
```php
4968
Qrcode::make('QR Code', 'field')
@@ -52,7 +71,9 @@ Qrcode::make('QR Code', 'field')
5271

5372
![Background](art/3-background.png)
5473

55-
#### With logo & background
74+
### Combining Logo & Background
75+
76+
Include both a logo and a background image for the QR code:
5677

5778
```php
5879
Qrcode::make('QR Code', 'field')

0 commit comments

Comments
 (0)