File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ The uuid trait automatically generates uuids for your Eloquent models.
9
9
- [ Usage] ( #usage )
10
10
- [ Primary Key] ( #primary-key )
11
11
- [ Custom Column] ( #custom-column )
12
+ - [ Scope] ( #scope )
12
13
13
14
## Usage
14
15
@@ -60,4 +61,15 @@ class User extends Model
60
61
61
62
const UUID_COLUMN = 'id';
62
63
}
63
- ```
64
+ ```
65
+
66
+ ## Scope
67
+
68
+ The trait provides a convenient scope for finding models based on the uuid column.
69
+ ` Model::uuid('638fa033-2bcf-48dd-896e-6e2b138f7138')->first() ` , or you may also supply an array of uuids
70
+ `Model::uuid([
71
+ '5d95a9c2-bc2c-4a2a-8e97-1eabf472319e',
72
+ '5785e0eb-155f-4c25-9e1a-c123a29a0cd8',
73
+ '041f681f-9c9b-4ca4-b623-fb9928490e8c',
74
+ '93b1e345-b262-4bc7-ad41-034f755a00c3',
75
+ ] )->get()`
You can’t perform that action at this time.
0 commit comments