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:
@@ -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');
|
||||
|
Reference in New Issue
Block a user