lucite/route
最新稳定版本:v0.0.6
Composer 安装命令:
composer require lucite/route
包简介
README 文档
README
A simple library for mapping api routes to lucite models.
5 methods are provided to setup the following routes:
- GET
/url/:->getMany() - GET
/url/{id}:->getOne() - POST
/url/:->create() - PATCH
/url/{id}:->update() - DELETE
/url/{delete}:->delete()
Each route returns a psr ResponseInterface with the following json structure in the body:
{
"success": true|false,
"data": array|object
"warnings": array,
"errors": object
}
Installation
composer require lucite/route
Usage
Each route should define 2 static properties:
public static string $modelNamespace;public static string $modelClass;
Note that $modelNamespace is likely the same for all of your routes, so you may want to define this in a parent class that inherits from Lucite\Route\Route, which in turn your final route classes inherit from.
Implementing permissions
Coming soon.
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-24