Skip to content

Commit 6e6f436

Browse files
committed
add Foreign Key Type (UUID, ULID, ID) section into README
1 parent 26bf692 commit 6e6f436

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- [Installation](#installation)
1313
- Usage
1414
- [User Configuration](#user-configuration)
15+
- [Foreign Key Type (UUID, ULID, ID)](#foreign-key-type-uuid-ulid-id)
1516
- [Visit Monitoring](#visit-monitoring)
1617
- [Delete Visit Monitoring Records By Specific Days](#delete-visit-monitoring-records-by-specific-days)
1718
- [Turn ON-OFF](#turn-on-off)
@@ -106,6 +107,26 @@ You can config your user with `user-monitoring.php` configuration file:
106107
- `table`: You can write your users table name if is not `users.
107108
- `guard`: The correct guard that using for user.
108109

110+
<a name="foreign-key-type-uuid-ulid-id"></a>
111+
### Foreign Key Type (UUID, ULID, ID)
112+
113+
If you are using `uuid` or `ulid`, you can change `foreign_key_type` to your correct foreign key type:
114+
115+
```php
116+
'user' => [
117+
...
118+
119+
/*
120+
* If you are using uuid or ulid you can change it for type of foreign_key.
121+
*
122+
* When you are using ulid or uuid, you need to add related trait into the models.
123+
*/
124+
'foreign_key_type' => 'uuid', // uuid, ulid, id
125+
],
126+
```
127+
128+
> **_NOTE:_** You must write `uuid` or `ulid` or `id`.
129+
109130
<a name="visit-monitoring"></a>
110131
## Visit Monitoring
111132

0 commit comments

Comments
 (0)