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

@@ -14,6 +14,7 @@ declare(strict_types=1);
namespace Catch;
use Catch\Support\Module\Installer;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
@@ -360,4 +361,20 @@ class CatchAdmin
{
return Str::replaceFirst(base_path(), '.', $path);
}
/**
*
* @param string $module
* @return Installer
*/
public static function getModuleInstaller(string $module): Installer
{
$installer = self::getModuleServiceProviderNamespace($module).'Installer';
if (class_exists($installer)) {
return app($installer);
}
throw new \RuntimeException("Installer [$installer] Not Found");
}
}