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();