mirror of
https://github.com/nullthoughts/laravel-data-sync.git
synced 2026-03-03 06:59:57 +00:00
Add data:sync command
This commit is contained in:
20
src/Console/Commands/Sync.php
Normal file
20
src/Console/Commands/Sync.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace distinctm\LaravelDataSync\Console\Commands;
|
||||||
|
|
||||||
|
use distinctm\LaravelDataSync\Updater;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class Sync extends Command
|
||||||
|
{
|
||||||
|
protected $signature = 'data:sync';
|
||||||
|
|
||||||
|
protected $description = 'Update Models with respective sync data files';
|
||||||
|
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->info('Updating Models with sync data files');
|
||||||
|
(new Updater)->run();
|
||||||
|
$this->comment('Data sync completed');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user