Skip to content

Commit 0803bd2

Browse files
committed
feat: update sign up docs
1 parent cc033d9 commit 0803bd2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/docs/auth/signup.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@ Most databases use `id` as the primary key. If you are using a different field a
5151
auth()->config('id.key', 'admin_id');
5252
```
5353

54-
If you are using UUIDs as your primary key, you can configure Leaf Auth to use them:
54+
If you are using UUIDs as your primary key, you just need to pass in your primary key instead of leaving it up to Leaf to generate it:
5555

56-
```php:no-line-numbers
57-
auth()->config('id.uuid', UUID::v4());
56+
```php{2}
57+
auth()->register([
58+
'id' => 'your-uuid',
59+
...
60+
]);
5861
```
5962

63+
Once Leaf detects a field with the same name as your primary key, it will use that field as the primary key.
64+
6065
## Signing a user up
6166

6267
To sign a user up is to create a new user account on your application. This is usually done by collecting the user's details and storing them in your database. You also need to validate the user's details to ensure they are correct and that they don't conflict with existing data.

0 commit comments

Comments
 (0)