Skip to content

Commit 1b07e73

Browse files
committed
Note on $model->uuid and $model->uuid_text attributes
1 parent 85303a9 commit 1b07e73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

uuid.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class User extends Model
3131
}
3232
```
3333

34-
Now, whenever you save a new model, a uuid will be generated.
34+
Now, whenever you save a new model, a uuid will be generated. When using the `BinaryUuid` trait, two attributes are provided, `$model->uuid` (The binary form) and `$model->uuid_text` (The string form).
35+
You should use `$model->uuid` whenever you are locating a model from the database, and use `$model->uuid_text` whenever you are display the uuid to your users (e.g API payloads).
3536

3637
#### Primary Key
3738

0 commit comments

Comments
 (0)