Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit b9f6a66

Browse files
update readme
1 parent 05a8fac commit b9f6a66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Register the service provider in your `config/app.php` configuration file:
3939
],
4040
```
4141

42-
There is nothing special needed for this to function, simply declare a `uuid` column type in your migration files. I indexing the UUID column if you plan on querying against it, but would avoid making it the primary key.
42+
### Migrations
43+
44+
There is nothing special needed for this to function, simply declare a `uuid` column type in your migration files. If you plan on querying against the UUID column, it is recommended that you index the column, but avoid making it the primary key.
4345

4446
```php
4547
Schema::create('posts', function (Blueprint $table) {
@@ -51,6 +53,8 @@ Schema::create('posts', function (Blueprint $table) {
5153
});
5254
```
5355

56+
### Casting
57+
5458
You will need to add a cast to your model when using [laravel-model-uuid](https://github.com/michaeldyrynda/laravel-model-uuid) in order to correctly set and retrieve UUID from your MySQL database with binary fields.
5559

5660
```php

0 commit comments

Comments
 (0)