datado/slim
最新稳定版本:1.2.3
Composer 安装命令:
composer require datado/slim
包简介
A bootstrapper for the Slim framework
README 文档
README
Build a Slim framework rest api from your Repository
What is Slim?
Slim is a solid rest api framework that allows you to easily develop rest apis. You can find all you need to know at slimframework.com.
Usage
To use this bootstrapper you first need to add the composer dependency
composer require datado/slim
Then you create your repository more info here and attach it to your application.
$app = new \Slim\App; \DataDo\Slim::attach($app, $repository); // Or a shortcut if you are in a hurry $app = \DataDo\Slim::create($repository); // You can also pass multiple repositories at the same time $app = \DataDo\Slim::create($pageRepository, $fileRepository, $userRepository); // All you need to do now is start the app $app->run();
And now you're good to go!
Let's say your repository is hosting User entities. Then the above code will have created a rest api at /users.
统计信息
- 总下载量: 52
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-08