info: Show base URL

This commit is contained in:
Franz Liedke 2016-03-22 00:28:02 +09:00
parent 96a40fd6ea
commit 5d88ad2431
2 changed files with 15 additions and 3 deletions

View File

@ -47,7 +47,10 @@ class Server extends AbstractServer
];
foreach ($commands as $command) {
$console->add($app->make($command));
$console->add($app->make(
$command,
['config' => $app->make('flarum.config')]
));
}
return $console;

View File

@ -22,11 +22,18 @@ class InfoCommand extends AbstractCommand
protected $extensions;
/**
* @param ExtensionManager $extensions
* @var array
*/
public function __construct(ExtensionManager $extensions)
protected $config;
/**
* @param ExtensionManager $extensions
* @param array $config
*/
public function __construct(ExtensionManager $extensions, array $config)
{
$this->extensions = $extensions;
$this->config = $config;
parent::__construct();
}
@ -57,5 +64,7 @@ class InfoCommand extends AbstractCommand
$this->info("EXT $name $version");
}
$this->info('Base URL: '.$this->config['url']);
}
}