app/admin/routes.ts
文件是后台程序的入口,所有的后台路由都必须在 start.group
路由组中定义。
方法 | Uri | Method | 功能描述 | 路由名 |
---|---|---|---|---|
index() | /resource | GET | 列表页面构建 & 分页数据获取 & 页面渲染 | resource.index |
create() | /resource | GET | 新增页面构建 | resource.create |
store() | /resource | POST | 新增数据 | resource.store |
show() | /resource/:id | GET | 详情页面构建 & 数据获取 | resource.show |
edit() | /resource/:id | GET | 编辑页面构建 | resource.edit |
update() | /resource/:id | PUT | 更新数据 | resource.update |
destroy() | /resource/:id | DELETE | 删除数据 | resource.destroy |
如果系统自带功能无法满足你的需求时,只需要在 start.override
路由组中覆盖系统的路由即可。