phpvms/app/Console/Commands/ImportFromClassic.php
2018-08-26 16:40:04 +00:00

29 lines
809 B
PHP

<?php
namespace App\Console\Commands;
use App\Console\Command;
class ImportFromClassic extends Command
{
protected $signature = 'phpvms:importer {db_host} {db_name} {db_user} {db_pass?} {table_prefix=phpvms_}';
protected $description = 'Import from an older version of phpVMS';
/**
* Run dev related commands
*/
public function handle()
{
$db_creds = [
'host' => $this->argument('db_host'),
'name' => $this->argument('db_name'),
'user' => $this->argument('db_user'),
'pass' => $this->argument('db_pass'),
'table_prefix' => $this->argument('table_prefix'),
];
$importerSvc = new \App\Console\Services\Importer($db_creds);
$importerSvc->run();
}
}