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

Commit c4e8000

Browse files
authored
Update README.md (#59)
Added information on how to use where with string uuid
1 parent 2b71e78 commit c4e8000

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ class Post extends Model
7676
}
7777
```
7878

79+
### Querying by UUID
80+
81+
If you want to find a record by a string UUID, you need to use scope:
82+
83+
```php
84+
Post::whereUuid('25b112a9-499a-4627-9ea0-72cd8694aee3')->first();
85+
86+
```
87+
7988
### Validation
8089

8190
Should you wish to use the efficient UUID column as part of your validation strategy, you may use the `EfficientUuidExists` rule as normal.

0 commit comments

Comments
 (0)