inthere / jsonapistrategy
此包最新版本(1.0.0)没有可用的许可证信息。
league/route包的JSON API策略
1.0.0
2017-05-12 11:44 UTC
Requires
- league/route: ^3.0
- neomerx/json-api: ^1.0
Requires (Dev)
- phpunit/phpunit: 6.1
README
league/route路由包允许自定义策略。此包提供了与JSONAPI标准的兼容性自定义策略。
安装
此包可以与league/route 3或更高版本一起使用。在之前的版本中,自定义策略未启用。
您可以通过composer安装此包
composer require inthere/jsonapistrategy
使用方法
为路由集合设置策略
use InThere\Route\JsonApi\JsonApiStrategy; $route = new League\Route\RouteCollection(); $route->setStrategy(new JsonApiStrategy());
或为单个路由使用策略
$route = new League\Route\RouteCollection; $route->get('/foo', Foo\FooController::bar::class) ->setStrategy(new JsonApiStrategy());
测试
$ vendor/bin/phpunit
贡献者
欢迎贡献。我们接受通过Github上的pull request的贡献。
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。
关于InThere
InThere - "通过游戏进行训练的公司" - 通过提供基于严肃游戏的微型培训概念,加速团队的培训和变革过程。