diff --git a/web/app/Filament/Pages/Modules.php b/web/app/Filament/Pages/Modules.php index ee16455..8543d34 100644 --- a/web/app/Filament/Pages/Modules.php +++ b/web/app/Filament/Pages/Modules.php @@ -51,6 +51,11 @@ class Modules extends Page ModulesManager::saveInstalledModule($this->installModule); + $moduleInfo = ModulesManager::getModuleInfo($this->installModule); + if (isset($moduleInfo['adminUrl'])) { + return $this->redirect($moduleInfo['adminUrl']); + } + $this->dispatch('close-modal', id: 'install-module-modal'); } } diff --git a/web/app/ModulesManager.php b/web/app/ModulesManager.php index 6bf8233..ee4f753 100644 --- a/web/app/ModulesManager.php +++ b/web/app/ModulesManager.php @@ -44,6 +44,11 @@ class ModulesManager if (isset($moduleJson['category'])) { $category = $moduleJson['category']; } + $adminUrl = ''; + if (isset($moduleJson['adminUrl'])) { + $adminUrl = $moduleJson['adminUrl']; + } + $url = ''; $installed = 0; $findModule = Module::where('name', $module)->first(); @@ -54,6 +59,7 @@ class ModulesManager 'name' => $module, 'description' => 'A drag and drop website builder and a powerful next-generation CMS.', 'url' => $url, + 'adminUrl' => $adminUrl, 'iconUrl' => url('images/modules/' . $module . '.png'), 'logoIcon' => $logoIcon, 'category' => $category,