mirror of
https://github.com/nullthoughts/laravel-data-sync.git
synced 2026-02-22 18:56:01 +00:00
Add installation instructions
This commit is contained in:
@@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
Laravel utility to keep records synced between enviroments through source control
|
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
|
- 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
|
- 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)
|
- Run `php artisan data:sync` (or `php artisan data:sync --model={model}` with the model flag to specify a model)
|
||||||
|
|
||||||
### Optional
|
### Optional
|
||||||
|
|||||||
Reference in New Issue
Block a user