Add user setup to installer

This commit is contained in:
Nabeel Shahzad
2017-12-29 16:56:46 -06:00
parent 50da3a9e54
commit 7cd4bf5ffb
24 changed files with 28377 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Console\Commands;
use App\Services\DatabaseService;
use DB;
use App\Console\BaseCommand;
@@ -10,9 +11,17 @@ use App\Models\Pirep;
class DevCommands extends BaseCommand
{
protected $signature = 'phpvms {cmd}';
protected $signature = 'phpvms {cmd} {--file=?}';
protected $description = 'Developer commands';
protected $dbSvc;
public function __construct(DatabaseService $dbSvc)
{
parent::__construct();
$this->dbSvc = $dbSvc;
}
/**
* Run dev related commands
*/
@@ -28,6 +37,7 @@ class DevCommands extends BaseCommand
$commands = [
'clear-acars' => 'clearAcars',
'compile-assets' => 'compileAssets',
'import' => 'importYaml',
];
if(!array_key_exists($command, $commands)) {
@@ -66,4 +76,12 @@ class DevCommands extends BaseCommand
$this->runCommand('npm update');
$this->runCommand('npm run dev');
}
/**
* Import data from a YAML file
*/
protected function importYaml()
{
$this->info('importing '. $this->argument('file'));
}
}