1
0
mirror of https://github.com/flarum/core.git synced 2025-10-10 22:44:25 +02:00

Implement web installer

This commit is contained in:
Toby Zerner
2015-08-17 14:12:02 +09:30
parent 17dbeefabe
commit 1052aa55ea
10 changed files with 596 additions and 45 deletions

View File

@@ -11,10 +11,13 @@ class ExtensionManager
protected $app;
public function __construct(SettingsRepository $config, Container $app)
protected $migrator;
public function __construct(SettingsRepository $config, Container $app, Migrator $migrator)
{
$this->config = $config;
$this->app = $app;
$this->migrator = $migrator;
}
public function getInfo()
@@ -80,15 +83,18 @@ class ExtensionManager
return $container->make('Illuminate\Database\ConnectionInterface')->getSchemaBuilder();
});
$migrator = $this->app->make('Flarum\Migrations\Migrator');
if ($up) {
$migrator->run($migrationDir, $extension);
$this->migrator->run($migrationDir, $extension);
} else {
$migrator->reset($migrationDir, $extension);
$this->migrator->reset($migrationDir, $extension);
}
}
public function getMigrator()
{
return $this->migrator;
}
protected function getEnabled()
{
$config = $this->config->get('extensions_enabled');