Add installation instructions

This commit is contained in:
distinctm
2019-06-12 17:49:22 -04:00
parent 3641ac5bd2
commit 58f1062aeb

View File

@@ -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