Skip to content

Commit f5d3e6a

Browse files
New details for column specification
1 parent aaf6044 commit f5d3e6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
# Usage
66

77
In each controller you want to auto-bind properties, add the `#[AutoBind]` attribute to each property.
8+
89
```php
910
use MylesDuncanKing\AutoBind\Attribute as AutoBindAttr;
1011

1112
#[AutoBindAttr]
1213
public Client $client;
1314
```
1415

16+
**Note:** You can specify an alternative to the ID column being used by default by defining a column value. (`#[AutoBindAttr(column: 'your_alternative_column')] `)
17+
1518
In your controller's construct method add the call to bind the properties.
1619

1720
```php

0 commit comments

Comments
 (0)