Releases: gigili/PHP-routing
Releases · gigili/PHP-routing
v2.0.6
Add new method wrappers:
- Add a wrapper for adding
get
endpoint
- Add a wrapper for adding
post
endpoint
- Add a wrapper for adding
put
endpoint
- Add a wrapper for adding
patch
endpoint
- Add a wrapper for adding
delete
endpoint
Sample:
$routes
->prefix("/test")
->middleware(['decode_token'])
->route("/t0", function(Request $request){})
->get("/t1", function (){})
->post("/t2", function (){})
->put("/t3", function (){})
->patch("/t4", function (){})
->delete("/t5", function (){})
->save();
Which is equivalent to doing:
$routes
->prefix("/test")
->middleware(['decode_token'])
->route("/t0", function(Request $request){})
->route("/t1", function (){}, [Routes::GET])
->route("/t2", function (){}, [Routes::POST])
->route("/t3", function (){}, [Routes::PATCH])
->route("/t4", function (){}, [Routes::PUT])
->route("/t5", function (){}, [Routes::DELETE])
->save();
v2.0.5.2
- Fix error thrown when json decode gives an object back
v2.0.5.1
- Fix PUT and PATCH body data not being parsed correctly
- Fix not getting request body for
PATCH
and PUT
when using form-data
or x-www-form-urlencoded
- Fix
$_FILES
being empty when using PATCH
or PUT
request to upload files
v2.0.5
- Fix not getting request body for PATCH and PUT when using
form-data
or x-www-form-urlencoded
v2.0.4.2
Fixed an issue #9
- when using the
->add
method in chained calls that routes doesn't get added if there are multiple ->route
calls first
v2.0.4
- Fixed getting the parameters from a PATCH request
- When the PATCH request was being sent, the body of the request was being put within a sub array so all the calls to
$request->get('param_name')
where returning NULL
v2.0.3
Fix the ability to detect heavily nested dynamic routes with similar paths:
/test/route/{param1}/{param2}
/test/route/{param1}/{param2}/extra
Now these will be detected properly
v2.0.2
- Add support for custom parameter ordering in callback arguments
- Fix code formatting
- Improve code documentation
v2.0.1
- Fixed a bug where prefix and/or middlewares weren't being set properly when using chained methods