Cleanup of some console commands
This commit is contained in:
@@ -2,13 +2,9 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Console\BaseCommand;
|
||||
|
||||
use Symfony\Component\Process\Process;
|
||||
use Symfony\Component\Process\Exception\ProcessFailedException;
|
||||
|
||||
|
||||
class CreateDatabase extends Command
|
||||
class CreateDatabase extends BaseCommand
|
||||
{
|
||||
protected $signature = 'database:create {--reset} {--conn=?}';
|
||||
protected $description = 'Create a database';
|
||||
@@ -20,21 +16,6 @@ class CreateDatabase extends Command
|
||||
$this->os = new \Tivie\OS\Detector();
|
||||
}
|
||||
|
||||
protected function runCommand($cmd)
|
||||
{
|
||||
$cmd = join(' ', $cmd);
|
||||
|
||||
$this->info('Running "' . $cmd . '"');
|
||||
|
||||
$proc = new Process($cmd);
|
||||
$proc->run();
|
||||
if (!$proc->isSuccessful()) {
|
||||
throw new ProcessFailedException($proc);
|
||||
}
|
||||
|
||||
echo $proc->getOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* create the mysql database
|
||||
* @param $dbkey
|
||||
|
||||
Reference in New Issue
Block a user