File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,37 @@ More scenarios are documented in the `examples/` directory:
107107- ` examples/04-creating-entities-with-string-uuid.md `
108108- ` examples/05-querying.md `
109109
110+ ## Configuration
111+
112+ If you want a global default UUID column name, publish the config and set the
113+ environment variable.
114+
115+ 1 . Publish the config file:
116+
117+ ``` bash
118+ php artisan vendor:publish --provider=" Verbanent\\ Uuid\\ Providers\\ BinaryUuidServiceProvider" --tag=binary-uuid-config
119+ ```
120+
121+ 2 . Set the default column name in ` .env ` :
122+
123+ ```
124+ BINARY_UUID_DEFAULT_COLUMN=uuid
125+ ```
126+
127+ 3 . Refresh config:
128+
129+ ``` bash
130+ php artisan config:clear
131+ # or
132+ php artisan config:cache
133+ ```
134+
135+ Per-model override still works and takes precedence:
136+
137+ ``` php
138+ protected $uuidColumn = 'custom_uuid';
139+ ```
140+
110141## Unit tests
111142
112143Run this command if you want to check unit tests:
You can’t perform that action at this time.
0 commit comments