feat:限制模块名称规则

This commit is contained in:
JaguarJack
2023-06-07 09:28:30 +08:00
parent 66f19d8ef1
commit a36fa86d8d
3 changed files with 11 additions and 20 deletions

View File

@@ -8,7 +8,6 @@ use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Modules\Develop\Support\Generate\Create\Schema;
use Illuminate\Support\Facades\Schema as SchemaFacade;
class Schemas extends CatchModel
{
@@ -108,22 +107,4 @@ class Schemas extends CatchModel
return $schema;
}
/**
* delete
*
* @param $id
* @param bool $force
* @return bool|null
*/
public function deleteBy($id, bool $force = false): ?bool
{
$schema = parent::firstBy($id);
if ($schema->delete()) {
SchemaFacade::dropIfExists($schema->name);
}
return true;
}
}