ibandominguez / restup-back
关于该包最新版本(v0.4.2)没有可用的许可信息。
v0.4.2
2016-10-13 15:19 UTC
Requires
- php: >=5.5.0
- firebase/php-jwt: ^4.0
- ibandominguez/validator: 1.2.*
- slim/slim: ^3.5
Requires (Dev)
- guzzlehttp/guzzle: ~6.0
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2024-09-18 21:30:32 UTC
README
在单个文件中构建REST API。
使用示例
<?php require __DIR__.'/../vendor/autoload.php'; use IbanDominguez\RestUp\App; App::create([ 'JWT_KEY' => 'supersecret', 'DB_HOST' => 'localhost', 'DB_NAME' => 'prueba', 'DB_USER' => 'root', 'DB_PASS' => '', ]) ->auth([ 'admin@email.com' => 'admin' ]) ->add('books', [ ['title' => 'title', 'type' => 'string', 'rules' => 'required'], ['title' => 'date', 'type' => 'date', 'rules' => 'required|date'], ]) ->add('posts', [ ['title' => 'title', 'type' => 'string', 'rules' => 'required'], ['title' => 'body', 'type' => 'string'], ['title' => 'date', 'type' => 'date', 'rules' => 'date'] ], [ 'except' => ['show'], 'protected' => ['save'] ]) ->run(true);
测试
git clone https://github.com/ibandominguez/restup-back.git
cd restup-back
phpunit
路线图
- 图片上传
- JWT认证可配置路由
贡献者
- Ibán Domínguez
许可
Mit