Last active
August 29, 2015 14:08
-
-
Save mattcdavis1/3cb5eea76f681f8d1b35 to your computer and use it in GitHub Desktop.
Installer Command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class RunInstallerCommand extends Command { | |
/** | |
* The console command name. | |
* | |
* @var string | |
*/ | |
protected $name = 'run-installer'; | |
/** | |
* The console command description. | |
* | |
* @var string | |
*/ | |
protected $description = 'Run Pyro Installer.'; | |
/** | |
* Create a new command instance. | |
* | |
* @return void | |
*/ | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
/** | |
* Execute the console command. | |
* | |
* @return mixed | |
*/ | |
public function fire() | |
{ | |
$postData = [ | |
// "_token": "8vYEr459ie3PMNTAFrlFtAFiemU603G7FKH6cL1b", | |
"database" => [ | |
"driver" => "mysql", | |
"host" => "localhost", | |
"database" => "pyro_spisales", | |
"user" => "root", | |
"password" => "root" | |
], | |
"administrator" => [ | |
"username" => "admin", | |
"email" => "[email protected]", | |
"password" => "welcome" | |
], | |
"application" => [ | |
"name" => "Default App", | |
"reference" => "default", | |
"locale" => "en", | |
"timezone" => "UTC" | |
], | |
]; | |
\Request::merge($postData); | |
$installer = app()->make('Anomaly\Streams\Addon\Distribution\Streams\Http\Controller\InstallController'); | |
$streamsDistributionService = app()->make('Anomaly\Streams\Addon\Distribution\Streams\StreamsDistributionService'); | |
$installer->install($streamsDistributionService); | |
$this->info('Install Complete'); | |
} | |
/** | |
* Get the console command arguments. | |
* | |
* @return array | |
*/ | |
protected function getArguments() | |
{ | |
return []; | |
} | |
/** | |
* Get the console command options. | |
* | |
* @return array | |
*/ | |
protected function getOptions() | |
{ | |
return []; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment