Skip to content

Instantly share code, notes, and snippets.

@mattcdavis1
Last active August 29, 2015 14:08
Show Gist options
  • Save mattcdavis1/3cb5eea76f681f8d1b35 to your computer and use it in GitHub Desktop.
Save mattcdavis1/3cb5eea76f681f8d1b35 to your computer and use it in GitHub Desktop.
Installer Command
<?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" => "matt.davis@union.co",
"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