Details config publishing

This commit is contained in:
distinctm
2019-01-23 14:10:29 -05:00
parent 7744dad056
commit 4bd6ac2d53

View File

@@ -2,11 +2,16 @@
Laravel utility to keep records synced between enviroments through source control
- Add new `sync` disk in `config/filesystems.php`
- Create a JSON file for each model, using the model name as the filename. Example: Product.json would update the Product model
- Use nested arrays in place of hardcoded IDs for relationships
- 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)
- Run `php artisan data:sync`
## Notes
- empty values are skipped
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
- nested values represent relationships and are returned using where($key, $value)->first()->id
## Examples
### User.json:
@@ -117,9 +122,4 @@ translates to...
'role_id' => Role::where('slug', 'destroy-ferrari')->first()->id,
]);
```
## Notes
- empty values are skipped
- the criteria/attributes for updateOrCreate are identified with a preleading underscore
- nested values represent relationships and are returned using where($key, $value)->first()->id
```