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: src/docs/auth/signup.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,12 +51,17 @@ Most databases use `id` as the primary key. If you are using a different field a
51
51
auth()->config('id.key', 'admin_id');
52
52
```
53
53
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:
55
55
56
-
```php:no-line-numbers
57
-
auth()->config('id.uuid', UUID::v4());
56
+
```php{2}
57
+
auth()->register([
58
+
'id' => 'your-uuid',
59
+
...
60
+
]);
58
61
```
59
62
63
+
Once Leaf detects a field with the same name as your primary key, it will use that field as the primary key.
64
+
60
65
## Signing a user up
61
66
62
67
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