项目初始化

This commit is contained in:
2026-03-18 17:19:03 +08:00
commit ac6079b9ff
602 changed files with 58291 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace support\bootstrap;
use think\Validate;
use support\think\Db;
use Workerman\Worker;
/**
* 验证器引导:为 think-validate 注入 Db使 unique 等规则可用
*/
class ValidateInit implements \Webman\Bootstrap
{
public static function start(?Worker $worker): void
{
Validate::maker(function (Validate $validate): void {
$validate->setDb(Db::connect());
});
}
}