From 58f1062aebc17133c8bdee9ed90caad9333f3479 Mon Sep 17 00:00:00 2001 From: distinctm Date: Wed, 12 Jun 2019 17:49:22 -0400 Subject: [PATCH] Add installation instructions --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 3c94f88..1d2e7da 100644 --- a/readme.md +++ b/readme.md @@ -2,10 +2,11 @@ Laravel utility to keep records synced between enviroments through source control - +## Installation & Usage +- Via composer: `composer require distinctm/laravel-data-sync` +- Run `php artisan vendor:publish --provider="distinctm\LaravelDataSync\DataSyncBaseServiceProvider" --tag="data-sync-config"` to publish config file. Specify directory for sync data files (default is a new sync directory in the project root) - 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 --provider="distinctm\LaravelDataSync\DataSyncBaseServiceProvider" --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` (or `php artisan data:sync --model={model}` with the model flag to specify a model) ### Optional