goosapi / goosapi
Goosapi Framework, create easy web api and services
1.2.8
2020-01-11 08:06 UTC
Requires
- php: >=5.3.0
- larapack/dd: 1.*
- monolog/monolog: ^2.0
- phpunit/phpunit: 3.7.*
README
/* Routing Example */ // http://localhost/goosapi/me/echo/13/toy?a=1 // $api->get("/me/echo/:id/:name", function($api, $id, $name) { // $api->response()->submit([ // "id" => $id, // "name" => $name, // ]); // }); // http://localhost/goosapi/show/13/test?a=1 // $api->get("show/:id/:title", "\Goosapi\Dumb\Post"); // http://localhost/goosapi/post/50?a=1 // $api->get("list/post/:id", "\Goosapi\Dumb\Post"); // $api->group("/v1", function($api) { // $api->route("/post", "\API\Post", [ // "/list" => "POST|OPTION", // /post/list // "/read/:id" => "GET", // /post/read/:id // "list" => "GET", // (list)/post // "list/:id" => "GET", // (list)/post/:id/ // "list/:id/name" => "GET", // (list)/post/:id/name // ]); // });