/**
* @param \Notadd\Foundation\Extension\ExtensionManager $manager
*/
public function boot(ExtensionManager $manager)
{
if ($this->app->isInstalled()) {
$manager->getExtensions()->each(function (Extension $extension) use($manager) {
$registrar = $extension->getRegistrar();
static::$complies = static::$complies->merge($registrar->compiles());
$this->commands($registrar->loadCommands());
(new Collection($registrar->loadLocalizationsFrom()))->each(function ($path, $namespace) {
$this->loadTranslationsFrom($path, $namespace);
});
(new Collection($registrar->loadMigrationsFrom()))->each(function ($paths) {
$this->loadMigrationsFrom($paths);
});
(new Collection($registrar->loadPublishesFrom()))->each(function ($to, $from) {
$this->publishes([$from => $to], 'public');
});
(new Collection($registrar->loadViewsFrom()))->each(function ($path, $namespace) {
$this->loadViewsFrom($path, $namespace);
});
$extension->enable();
$this->app->make(Dispatcher::class)->fire(new ExtensionEnabled($this->app, $manager, $extension));
$manager->boot($registrar);
});
}
$this->commands([InstallCommand::class, ListCommand::class, UninstallCommand::class, UpdateCommand::class]);
}