first commit

This commit is contained in:
liu
2026-07-13 15:23:29 +08:00
commit 50885a98c8
473 changed files with 33772 additions and 0 deletions
@@ -0,0 +1,28 @@
<?php
namespace Modules\AnnoRoute\Attribute;
use Attribute;
use Modules\AnnoRoute\BaseAttribute;
#[Attribute(Attribute::TARGET_METHOD)]
class DeleteRoute extends BaseAttribute
{
/** @var string 请求方法 */
public string $httpMethod = 'DELETE';
/**
* @param string $route 路由地址
* @param string|bool $authorize 权限字段
* @param string|array $middleware 中间件
* @param array $where 路由参数约束
*/
public function __construct(
public string $route = '',
public string|bool $authorize = true,
public string | array $middleware = '',
public array $where = [],
)
{
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Modules\AnnoRoute\Attribute;
use Attribute;
use Modules\AnnoRoute\BaseAttribute;
#[Attribute(Attribute::TARGET_METHOD)]
class GetRoute extends BaseAttribute
{
/** @var string 请求方法 */
public string $httpMethod = 'GET';
/**
* @param string $route 路由地址
* @param string|bool $authorize 权限字段
* @param string|array $middleware 中间件
* @param array $where 路由参数约束
*/
public function __construct(
public string $route = '',
public string|bool $authorize = true,
public string | array $middleware = '',
public array $where = [],
)
{
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Modules\AnnoRoute\Attribute;
use Attribute;
use Modules\AnnoRoute\BaseAttribute;
#[Attribute(Attribute::TARGET_METHOD)]
class PostRoute extends BaseAttribute
{
/** @var string 请求方法 */
public string $httpMethod = 'POST';
/**
* @param string $route 路由地址
* @param string|bool $authorize 权限字段
* @param string|array $middleware 中间件
* @param array $where 路由参数约束
*/
public function __construct(
public string $route = '',
public string|bool $authorize = true,
public string | array $middleware = '',
public array $where = [],
)
{
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Modules\AnnoRoute\Attribute;
use Attribute;
use Modules\AnnoRoute\BaseAttribute;
#[Attribute(Attribute::TARGET_METHOD)]
class PutRoute extends BaseAttribute
{
/** @var string 请求方法 */
public string $httpMethod = 'PUT';
/**
* @param string $route 路由地址
* @param string|bool $authorize 权限字段
* @param string|array $middleware 中间件
* @param array $where 路由参数约束
*/
public function __construct(
public string $route = '',
public string|bool $authorize = true,
public string | array $middleware = '',
public array $where = [],
)
{
}
}
@@ -0,0 +1,24 @@
<?php
namespace Modules\AnnoRoute\Attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
class RequestAttribute
{
/**
* @param string $routePrefix 路由前缀
* @param string $abilitiesPrefix 权限前缀
* @param string | array $middleware 控制器中间件
* @param string | null $authGuard 用户提供程序
*/
public function __construct(
public string $routePrefix = '',
public string $abilitiesPrefix = '',
public string | array $middleware = '',
public ?string $authGuard = null
)
{
}
}