Skip to content

Commit 13521ec

Browse files
committed
update readme
1 parent 4e8e1c6 commit 13521ec

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Publish](#publish)
1515
- [Usage](#usage)
1616
- [Configuration](#configuration)
17+
- [User Configuration](#user-configuration)
1718
- [Laravel Cart Facade](#laravel-cart-facade)
1819
- [Driver](#driver)
1920
- [Support Drivers](#support-drivers)
@@ -93,6 +94,23 @@ After publishing, run the `php artisan migrate` command.
9394

9495
You can config the `Laravel Cart` with `laravel-cart.php` config that exists in `config` folder.
9596

97+
<a name="user-configuration"></a>
98+
#### User Configuration
99+
100+
If you are using `uuid` or `ulid`, you can change `foreign_key_type` to your correct foreign key type:
101+
102+
```php
103+
'users' => [
104+
...
105+
106+
/*
107+
* Specify the type of foreign key being used (e.g., 'id', 'uuid', 'ulid').
108+
* For non-standard IDs, make sure to add the relevant traits to your models.
109+
*/
110+
'foreign_key_type' => 'id', // Options: uuid, ulid, id
111+
],
112+
```
113+
96114
<a name="laravel-cart-facade"></a>
97115
### Laravel Cart Facade
98116

0 commit comments

Comments
 (0)