Skip to content

Commit 6de5cfa

Browse files
committed
Update README.md
1 parent af09dba commit 6de5cfa

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- [Installation](#installation)
1313
- [Usage](#usage)
1414
- [Configuration](#configuration)
15-
- [Routes Configuration](#routes-configuration)
15+
- [Routes Configuration](#routes-configuration)
1616
- [User Configuration](#user-configuration)
1717
- [Foreign Key Type (UUID, ULID, ID)](#foreign-key-type-uuid-ulid-id)
1818
- [Visit Monitoring](#visit-monitoring)
@@ -149,23 +149,35 @@ You can config your user with the `user-monitoring.php` configuration file:
149149
'table' => 'users',
150150

151151
/*
152-
* The correct guard.
152+
* You can customize which guards are used to authenticate or
153+
* store user data across different parts of the application. Each guard
154+
* will be checked independently, allowing users to be authenticated by
155+
* multiple guards and enabling more flexible user management.
156+
*
157+
* Make sure that each guard is properly configured under the 'guards' section in the auth.php config file.
153158
*/
154-
'guard' => 'web',
159+
'guards' => ['web'],
155160

156161
/*
157162
* If you are using uuid or ulid you can change it for the type of foreign_key.
158163
*
159-
* When you are using ulid or uuid, you need to add related traits into the models.
164+
* When using ulid or uuid, you need to add related traits into the models.
160165
*/
161166
'foreign_key_type' => 'id', // uuid, ulid, id
167+
168+
/*
169+
* If you want to display a custom username, you can create your attribute in User and change this value.
170+
*/
171+
'display_attribute' => 'name',
162172
],
163173
```
164174

165175
- `model`: If your user model exists in another place, you can change it to the correct namespace.
166176
- `foreign_key`: You can set the user foreign_key name, like `customer_id`.
167177
- `table`: You can write your users table name if is not `users.
168-
- `guard`: The correct guard that using for the user.
178+
- `guards`: The guards are used to authenticate.
179+
- `foreign_key_type`: The foreign key type (uuid-ulid-id).
180+
- `display_attribute`: The special attribute of user that you want to show in views.
169181

170182
<a name="foreign-key-type-uuid-ulid-id"></a>
171183
### Foreign Key Type (UUID, ULID, ID)

0 commit comments

Comments
 (0)