Skip to content

Commit 4bd6ac2

Browse files
committed
Details config publishing
1 parent 7744dad commit 4bd6ac2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
Laravel utility to keep records synced between enviroments through source control
44

5-
- Add new `sync` disk in `config/filesystems.php`
5+
66
- Create a JSON file for each model, using the model name as the filename. Example: Product.json would update the Product model
77
- Use nested arrays in place of hardcoded IDs for relationships
8+
- Run `php artisan vendor:publish --tag="data-sync-config"` to publish config file. Specify directory for sync data files (default is a new sync directory in the project root)
89
- Run `php artisan data:sync`
910

11+
## Notes
12+
- empty values are skipped
13+
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
14+
- nested values represent relationships and are returned using where($key, $value)->first()->id
1015

1116
## Examples
1217
### User.json:
@@ -117,9 +122,4 @@ translates to...
117122
'role_id' => Role::where('slug', 'destroy-ferrari')->first()->id,
118123
]);
119124

120-
```
121-
122-
## Notes
123-
- empty values are skipped
124-
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
125-
- nested values represent relationships and are returned using where($key, $value)->first()->id
125+
```

0 commit comments

Comments
 (0)