level51/silverstripe-find-http-action
最新稳定版本:0.2.0
Composer 安装命令:
composer require level51/silverstripe-find-http-action
包简介
Finds actions by HTTP method used on the request.
README 文档
README
Trait for finding controller actions by HTTP method used on the request. Handy for building CRUD based Webservices. Can be used alongside the default action handling.
Requirements
- Silverstripe 4.x
Installation
composer require level51/silverstripe-find-http-action- Flush config (
flush=all)
Usage
use Level51\FindHTTPAction\FindHTTPAction; use SilverStripe\Control\Controller; class MyCRUDController extends Controller { use FindHTTPAction; ... private static $url_handlers = [ 'foo/$id' => [ 'GET' => 'getFooRecords', 'POST' => 'createFooRecord', 'PUT' => 'updateFooRecord', 'DELETE' => 'deleteFooRecord' ], 'bar/$id!' => [ 'PUT' => 'updateBarRecord' ], 'about' => 'myRegularAction ]; }
Maintainer
- Julian Scheuchenzuber js@lvl51.de
统计信息
- 总下载量: 1.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-19