From 4bd6ac2d533551959fe2d27362b1e008a891c08a Mon Sep 17 00:00:00 2001 From: distinctm Date: Wed, 23 Jan 2019 14:10:29 -0500 Subject: [PATCH] Details config publishing --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 3acc916..6152d8d 100644 --- a/readme.md +++ b/readme.md @@ -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 \ No newline at end of file +``` \ No newline at end of file