feat: 分离前端列表

This commit is contained in:
JaguarJack
2022-12-06 19:27:38 +08:00
parent 0024080c28
commit 727e887729
38 changed files with 552 additions and 146 deletions

View File

@@ -64,7 +64,7 @@ class DatabaseDriver implements ModuleRepositoryInterface
'path' => $module['path'],
'description' => $module['desc'],
'keywords' => $module['keywords'],
'service' => sprintf('\\%s%s', CatchAdmin::getModuleNamespace($module['name']), ucfirst($module['name']).'ServiceProvider'),
'provider' => sprintf('\\%s%s', CatchAdmin::getModuleNamespace($module['name']), ucfirst($module['name']).'ServiceProvider'),
]);
}
@@ -92,7 +92,7 @@ class DatabaseDriver implements ModuleRepositoryInterface
->update([
'name' => $module['name'],
'alias' => $module['alias'],
'path' => $module['path'],
'description' => $module['desc'],
'keywords' => $module['keywords'],
]);
@@ -146,7 +146,7 @@ class DatabaseDriver implements ModuleRepositoryInterface
throw new FailedException(sprintf('Module [%s] has been created', $module['name']));
}
if ($this->model->where('alias', $module['alias'])->first()) {
if ($this->model->where('path', $module['path'])->first()) {
throw new FailedException(sprintf('Module Alias [%s] has been exised', $module['alias']));
}
}

View File

@@ -78,7 +78,7 @@ class FileDriver implements ModuleRepositoryInterface
$this->hasSameModule($module, $modules);
$module['service'] = sprintf('\\%s', CatchAdmin::getModuleServiceProvider($module['path']));
$module['provider'] = sprintf('\\%s', CatchAdmin::getModuleServiceProvider($module['path']));
$module['version'] = '1.0.0';
$module['enable'] = true;

View File

@@ -73,7 +73,7 @@ abstract class Installer
*
* @return void
*/
public function __invoke(): void
public function install(): void
{
// TODO: Implement __invoke() method.
$this->moduleRepository->create($this->info());