mirror of
https://github.com/nullthoughts/laravel-data-sync.git
synced 2026-01-30 15:46:31 +00:00
26 lines
585 B
PHP
26 lines
585 B
PHP
<?php
|
|
|
|
namespace distinctm\LaravelDataSync\Console\Commands;
|
|
|
|
use distinctm\LaravelDataSync\Updater;
|
|
use Illuminate\Console\Command;
|
|
|
|
class Sync extends Command
|
|
{
|
|
protected $signature = 'data:sync {--path=} {--model=}';
|
|
|
|
protected $description = 'Update Models with respective sync data files';
|
|
|
|
public function handle()
|
|
{
|
|
$path = $this->option('path');
|
|
$model = $this->option('model');
|
|
|
|
$this->info('Updating Models with sync data files');
|
|
|
|
(new Updater($path, $model))->run();
|
|
|
|
$this->comment('Data sync completed');
|
|
}
|
|
}
|