mirror of
https://github.com/flarum/framework.git
synced 2025-02-24 08:36:40 +08:00
info: Show base URL
This commit is contained in:
parent
fb954a0e0d
commit
c90bc3a753
@ -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;
|
||||||
|
@ -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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user