|
12 | 12 | - [Installation](#installation) |
13 | 13 | - [Usage](#usage) |
14 | 14 | - [Configuration](#configuration) |
15 | | - - [Routes Configuration](#routes-configuration) |
| 15 | + - [Routes Configuration](#routes-configuration) |
16 | 16 | - [User Configuration](#user-configuration) |
17 | 17 | - [Foreign Key Type (UUID, ULID, ID)](#foreign-key-type-uuid-ulid-id) |
18 | 18 | - [Visit Monitoring](#visit-monitoring) |
@@ -149,23 +149,35 @@ You can config your user with the `user-monitoring.php` configuration file: |
149 | 149 | 'table' => 'users', |
150 | 150 |
|
151 | 151 | /* |
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. |
153 | 158 | */ |
154 | | - 'guard' => 'web', |
| 159 | + 'guards' => ['web'], |
155 | 160 |
|
156 | 161 | /* |
157 | 162 | * If you are using uuid or ulid you can change it for the type of foreign_key. |
158 | 163 | * |
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. |
160 | 165 | */ |
161 | 166 | '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', |
162 | 172 | ], |
163 | 173 | ``` |
164 | 174 |
|
165 | 175 | - `model`: If your user model exists in another place, you can change it to the correct namespace. |
166 | 176 | - `foreign_key`: You can set the user foreign_key name, like `customer_id`. |
167 | 177 | - `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. |
169 | 181 |
|
170 | 182 | <a name="foreign-key-type-uuid-ulid-id"></a> |
171 | 183 | ### Foreign Key Type (UUID, ULID, ID) |
|
0 commit comments