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
Copy file name to clipboardexpand all lines: README.md
+3
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,16 @@
5
5
# Usage
6
6
7
7
In each controller you want to auto-bind properties, add the `#[AutoBind]` attribute to each property.
8
+
8
9
```php
9
10
use MylesDuncanKing\AutoBind\Attribute as AutoBindAttr;
10
11
11
12
#[AutoBindAttr]
12
13
public Client $client;
13
14
```
14
15
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
+
15
18
In your controller's construct method add the call to bind the properties.
0 commit comments