新增seedPath创建方法

This commit is contained in:
JaguarJack 2020-06-25 08:35:52 +08:00
parent d2bc7a25c0
commit cfaec3fbc3
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,10 @@
<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------

View File

@ -84,7 +84,11 @@ class CatchAdmin
*/
public static function moduleSeedsDirectory($module): string
{
return self::directory() . $module . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR. 'seeds' . DIRECTORY_SEPARATOR;
$seedPath = self::directory() . $module . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR. 'seeds' . DIRECTORY_SEPARATOR;
self::makeDirectory($seedPath);
return $seedPath;
}
/**