info: Show base URL

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

View File

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

View File

@ -22,11 +22,18 @@ class InfoCommand extends AbstractCommand
protected $extensions; 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->extensions = $extensions;
$this->config = $config;
parent::__construct(); parent::__construct();
} }
@ -57,5 +64,7 @@ class InfoCommand extends AbstractCommand
$this->info("EXT $name $version"); $this->info("EXT $name $version");
} }
$this->info('Base URL: '.$this->config['url']);
} }
} }