Allows for user provided path option

This commit is contained in:
Jani Gyllenberg
2019-01-22 22:28:27 -05:00
parent b92b149846
commit 8dbdeb3e66
2 changed files with 32 additions and 7 deletions

View File

@@ -7,14 +7,16 @@ use Illuminate\Console\Command;
class Sync extends Command
{
protected $signature = 'data:sync';
protected $signature = 'data:sync {--path=}';
protected $description = 'Update Models with respective sync data files';
public function handle()
{
$path = $this->option('path');
$this->info('Updating Models with sync data files');
(new Updater)->run();
(new Updater($path))->run();
$this->comment('Data sync completed');
}
}