Skip to content

Commit

Permalink
Docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristories committed Nov 11, 2024
1 parent 3293dc1 commit 11563ab
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,40 @@ composer require devtical/nova-qrcode-field
use Devtical\Qrcode\Qrcode;
```

#### Basic
#### Basic QR Code

To create a basic QR code with default settings:

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

#### Setting sizes
#### Setting QR Code Sizes

Specify the sizes for index and detail views:

```php
Qrcode::make('QR Code', 'field')
->indexSize(100)
->detailSize(500)
->indexSize(100) // QR size for index view
->detailSize(500) // QR size for detail view
```

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

#### With logo
### Margin Customization

Control the padding around the QR code for optimal appearance:

```php
Qrcode::make('QR Code', 'field')
->margin(10)
```

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`.

### Adding a Logo

Add a logo to the center of the QR code:

```php
Qrcode::make('QR Code', 'field')
Expand All @@ -43,7 +60,9 @@ Qrcode::make('QR Code', 'field')

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

#### With background
### Setting a Background Image

Set a background image for the QR code:

```php
Qrcode::make('QR Code', 'field')
Expand All @@ -52,7 +71,9 @@ Qrcode::make('QR Code', 'field')

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

#### With logo & background
### Combining Logo & Background

Include both a logo and a background image for the QR code:

```php
Qrcode::make('QR Code', 'field')
Expand Down

0 comments on commit 11563ab

Please sign in to comment.